Go Down

Topic: detect the color of a traffic light with the tcs34725 (Read 108 times) previous topic - next topic



For a school work we have to make a robot-car that can read traffic lights,
The distance between the sensor and the traffic light is 15 cm,
but we are struggling to write a good arduino program to detect the color of the traffic light.
We need to detect the difference between a red light and are green light.
The lights are flickering with a frequency of 1 hertz.

Can somebody help?


73 de ZS6JMB
Dr Perry Cox: "Help me to help you, help me to help you...."
Your answer may already be here: https://forum.arduino.cc/index.php?topic=384198.0



I already read the tutorial and pdf but none of them gave me enough information to work it out on my own.


Take eight readings over a two second interval. If all are the same color then that's the color. If the first part is one color and the last part is the other color then the light changed in the middle and the new color is the last part.

Go Up

Please enter a valid email to subscribe

Confirm your email address

We need to confirm your email address.
To complete the subscription, please click the link in the email we just sent you.

Thank you for subscribing!

via Egeo 16
Torino, 10131