Determining distance by color.

I created a distance meter that changes color at set increments. The light is blue 2000mm from sensor. The light changes to green at 1000mm. The light flashes red at 500mm to the sensor and an alarm goes off at 250mm.
I used a Parallax Ping distance sensor with RGB led and Arduino.
Code can found here. github.com/AnnaKolla/PComp_1/blob/master/distance_RGB.ino

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s