Pages: [1]   Go Down
Author Topic: Need Help with colour sensor module coding (TCS3200)  (Read 178 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 1
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I have recently purchased a tcs3200 colour sensor module for Arduino and would like to design a code to detect only two colours, either blue or red. So it simply has to output the colour of the object or light up either of the colour leds connected seperately to the arduino (blue or red) after the object has been placed in front of the detector. I have looked at similar coding but they all seem to complex and don't really give the output I need. So just to put it down in point form as to what the code should do:
-Pins S0 and S1 will be connected to VCC always since I want it to operate at maximum frequency.
-The code should output the colour of the object placed in front of the detector which is either red or blue, any other colour doesnt matter and can be assigned a seperate output. Alternatively rather than display the output it can light up an LED corresponding to either colour which are pinned to Arduino.

Any help would be much appreciated
Logged

Sydney, Australia
Online Online
Edison Member
*
Karma: 33
Posts: 1284
Big things come in large packages
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

My code repository has a library for this device. Of interest for you might be the documentation with the library on how to use and calibrate the device.  Link below in the signature block.

What you want to do is in your software, not inherent in the way the sensor works. The sensor will return the rgb value of the color it sees. If all you want are the r and b vales, just use those. Your software will need to decide how you handle colors like purple that present a red and blue reading, for example.
« Last Edit: August 23, 2014, 06:52:04 pm by marco_c » Logged

Arduino libraries http://arduinocode.codeplex.com
Parola hardware & library http://parola.codeplex.com

Pages: [1]   Go Up
Jump to: