TCS37425 RGB color sensor board

For other supported Arduino products from Adafruit: Shields, accessories, etc.

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
User avatar
hgeagle
 
Posts: 7
Joined: Tue May 21, 2013 3:10 pm

TCS37425 RGB color sensor board

Post by hgeagle »

The product description says:
" The LED can be easily turned on or off by any logic level output."
(connect to which contact(s) on the board?)

The adafruit learning system tutorial states:
>Interrupts and LED control:
>vo id Adafruit_TCS34725: : setInterrupt(bo o lean i)
>Sets the sensor interrupt to generate an interrupt when the detected level is within the limits
>(see setIntLimits() below).
>Passing "false" will enable the on-board led for reflected light measurement.
>Passing "true" will turn the led off for incident light measurement.
(sounds simple...)

I am running the example "colorview" with the line:
"tcs.setInterrupt(true); // turn off LED"
but the LED stays on all the time.
What am I missing? What do I do wrong?
Could you supply a schematic of the board?

Thanks,
hgeagle

User avatar
adafruit_support_bill
 
Posts: 88087
Joined: Sat Feb 07, 2009 10:11 am

Re: TCS37425 RGB color sensor board

Post by adafruit_support_bill »

Are you using the breakout board or the Flora version of the sensor? With the breakout board you can control the LED with the LED pin. I'm looking into the library issue & schematics.

User avatar
hgeagle
 
Posts: 7
Joined: Tue May 21, 2013 3:10 pm

Re: TCS37425 RGB color sensor board

Post by hgeagle »

Currently I am using the breakout board. Thanks for looking into this!

User avatar
adafruit_support_bill
 
Posts: 88087
Joined: Sat Feb 07, 2009 10:11 am

Re: TCS37425 RGB color sensor board

Post by adafruit_support_bill »

Here's the word from the design team:
tie LED low to turn it off (or to a digital pin to control it on/off)

to control the LED from the INT pin, tie LED to INT. then you can call setInterrupt to turn it on/off. just give it at least 50ms to stabilize before you take a reading!
and example code:

Code: Select all

 tcs.setInterrupt(false);      // turn on LED
 delay(60);  // takes 50ms to read

 tcs.getRawData(&r, &g, &b, &c);

 tcs.setInterrupt(true);  // turn off LED  delay(1000);

User avatar
hgeagle
 
Posts: 7
Joined: Tue May 21, 2013 3:10 pm

Re: TCS37425 RGB color sensor board

Post by hgeagle »

Thanks, that did it!
It might be useful to include the wiring (LED - INT) in the color sensor tutorial(s). I did not see it there...
I am wondering how this issue is dealt with in case of the Flora color sensor version (there is no LED or INT pin).
The "Chamaleon Scarf" is really cool!!

User avatar
adafruit_support_bill
 
Posts: 88087
Joined: Sat Feb 07, 2009 10:11 am

Re: TCS37425 RGB color sensor board

Post by adafruit_support_bill »

Thanks for the feedback. I'll be updating the tutorial shortly. :)

User avatar
michaelaf
 
Posts: 3
Joined: Sun Apr 28, 2013 6:33 am

Re: TCS37425 RGB color sensor board

Post by michaelaf »

Hello,

I am doing the same thing today, also wanting to turn the led off. Does "tie LED to INT" mean connect the two pins on the TCS sensor board with a wire on the breadboard? I imagine this is what you mean but I'd rather be sure...

Thanks

User avatar
hgeagle
 
Posts: 7
Joined: Tue May 21, 2013 3:10 pm

Re: TCS37425 RGB color sensor board

Post by hgeagle »

Hello michaelaf,

Yes, use a wire and connect LED with INT on the breadboard. But then you need to use the code
"tcs.setInterrupt(true); // turn off LED"
to turn the led off.

I think you can just connect the LED pin with "ground" (".. tie LED low...") to turn it off without code. It works, I tried it, but without seeing the schematic I cannot be sure if that could lead to other problems.

Maybe Bill could advise... :)

User avatar
michaelaf
 
Posts: 3
Joined: Sun Apr 28, 2013 6:33 am

Re: TCS37425 RGB color sensor board

Post by michaelaf »

Hello hgeagle,

I've done it via the breadboard and it worked perfectly. Thanks :D

User avatar
adafruit_support_bill
 
Posts: 88087
Joined: Sat Feb 07, 2009 10:11 am

Re: TCS37425 RGB color sensor board

Post by adafruit_support_bill »

Yes, you can tie it to ground or pull it low with a spare pin if you have one.

User avatar
michaelaf
 
Posts: 3
Joined: Sun Apr 28, 2013 6:33 am

Re: TCS37425 RGB color sensor board

Post by michaelaf »

Hi Again,

Is there a way to turn the LED off all the time? At the moment, using "tcs.setInterrupt(true); the LED flashes briefly each time the loop runs, but I'd like it to be off all the time. How can I write this into setup instead of the loop?

User avatar
adafruit_support_bill
 
Posts: 88087
Joined: Sat Feb 07, 2009 10:11 am

Re: TCS37425 RGB color sensor board

Post by adafruit_support_bill »

Is there a way to turn the LED off all the time?
Call setInterrupt(true) in setup (and never again). Or just wire the LED pin to GND.

d4rren
 
Posts: 1
Joined: Wed Mar 05, 2014 7:03 am

Re: TCS37425 RGB color sensor board

Post by d4rren »

Hi

Is there a way of turning the LED off/on if using the Flora color sensor version (there is no LED or INT pin)?

I've tried the tcs.setInterrupt(true/false); method but without success.

If this is not successful my plan B will be to connect VIN to a digital pin and briefly power up the sensor when I want to use it.

Thanks

User avatar
adafruit_support_bill
 
Posts: 88087
Joined: Sat Feb 07, 2009 10:11 am

Re: TCS37425 RGB color sensor board

Post by adafruit_support_bill »

The Flora version does not have LED control. I think your Plan B is the way to go.

uobine
 
Posts: 1
Joined: Sun Jun 22, 2014 11:10 pm

Re: TCS37425 RGB color sensor board

Post by uobine »

Hello! I major Design Engineering in university in Korea and I studying TCS37425 RGB color sensor with a RGB Neopixel.
l tried "Chameleon Scarf" arduino source, and I need some more source.
This source is now possible to only once, but color recognition is, I is repeated once, but want to be able to detect the sensor.
Therefore, after the last of the sauce in the "void loop" I hope to inform.

Locked
Please be positive and constructive with your questions and comments.

Return to “Other Arduino products from Adafruit”