Saturday, August 8, 2015

Color Sensor TCS230/TCS3200

I got this sensor off Amazon.  It was fun to play with but surprisingly difficult to get meaningful results from.  The difficulty is primarily due to sensor limitations.  There are quite a few sites with Arduino code for this sensor, I am using a MSP432 LaunchPad here.  I wanted to keep it simple and use the pulseIn() function.  It works with the MSP432, but not so well with the F5529.  A better approach would be to use a timer and count interrupts from the pulses.

See my git repository here for the pin connections, code, and a deeper discussion.

The following is a photo of the sensor I'm using and some examples of what you might expect:


3 comments:

  1. This comment has been removed by the author.

    ReplyDelete
  2. does pulsein function work with CC3220S launchpads... im getting zero constantly...

    ReplyDelete
  3. PulseIn is standard Energia / Arduino but I don't know if it works with the CC3220 or not as I do not have one and no longer use Energia much.

    There is some more conversation about these sensors at 43oh.com - for example here:
    https://forum.43oh.com/topic/8780-tcs230tcs3200-color-sensor/?tab=comments#comment-67487

    You might start a new thread and see if you get a response.

    ReplyDelete