Sharp IR sensor with color feedback

Arduino


Here is a simple way to implement distance sensing and an Arduino. The website has more pictures and all the Arduino code so you can easily make one for yourself.

I bought a Sharp GP2Y0A21YK0F Distance Sensor to use in my robot. It was very easy to see the data returned in a serial console window, but I thought it would be cool to see the distance in zones represented by colors from a tricolor LED. Then you would not need to be connected to the computer to tell distance. Green would indicate a safe distance, yellow would represent a cautionary distance and red would be for distances that would require my robot to take evasive action.

Read more about Sharp IR sensor with color feedback

What will the next generation of Make: look like? We’re inviting you to shape the future by investing in Make:. By becoming an investor, you help decide what’s next. The future of Make: is in your hands. Learn More.

Discuss this article with the rest of the community on our Discord server!

ADVERTISEMENT

Escape to an island of imagination + innovation as Maker Faire Bay Area returns for its 16th iteration!

Prices Increase in....

Days
Hours
Minutes
Seconds
FEEDBACK