Code Monkey home page Code Monkey logo

pxt-color-sensor's Introduction

pxt-color-sensor

  • for TCS3200 color sensor
  • S0, S1 used for output frequency scaling selection inputs. It is preset at 2%.
  • S2, S3 used in selection filter type.
  • OUT is frequency output pin.
  • VCC and GND for supply voltage and ground.
  • OE (output enable) is not used in this library, the application can control it
  • It takes some time, which the user can specify, to calibrate the sensor. When calibrating the sensor, "C" is shown in the display or you can use the serial monitor for more details.
  • check Footnotes for more details.

Blocks

Calibration

To calibrate the color sensor. You can specify the calibration time for each color, the longer it takes to calibrate, the more accurate it will be (theoretically).

Connect the sensor to micro:bit. Set up the pins, place the sensor onto a piece of white paper, then start running this block.

Read Color

Return to color value (0-255) when applying the selected filter.

It takes time t (argument of TSC3200.calibrate()) for each filter. So to get all RGB values, it takes 3*t.

TODO (package)

  • Add a reference for your blocks here
  • Add "icon.png" image (300x200) in the root folder
  • Add "- beta" to the GitHub project description if you are still iterating it.
  • Turn on your automated build on https://travis-ci.org
  • Use "pxt bump" to create a tagged release on GitHub
  • Get your package reviewed and approved https://makecode.microbit.org/packages/approval

Read more at https://makecode.microbit.org/packages/build-your-own

License

MIT

Supported targets

  • for PXT/microbit

Footnotes

datasheet: https://www.mouser.com/catalog/specsheets/TCS3200-E11.pdf

pxt-color-sensor's People

Contributors

doralc avatar seasonedbits avatar

Watchers

 avatar  avatar

Forkers

callitgs3

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.