Jump to content

Arduino - Temperature sensor to RGB LED

Shadow5679

Hey all,

I was just wondering if someone could help me to make an arduino circuit get the temperature from a sensor, and then change the colour of an RGB LED depending on the temperature.

Any help is appreciated!

 

Some guy called my office, trying to sell me computers. I just said "oh you mean those little box's with the tv on top? Yeah, our accountant has some". He promptly gave up and hung up the phone lol

 
Link to comment
Share on other sites

Link to post
Share on other sites

You need to get the value from your temperature sensor, it can depend on the model (check the documentation) and output it to your led.

 

An RGB led have 4 pins, 1 for each color and a negative. Each color pin need to be connected to a digital or analog (I can remember) pin since you need to output a value from 0 to 255 (0 = not power, 255 = full power).

 

In the code you will need a loop that take the input from the digital or analog (I can remember) pin of the sensor and convert it to data you want. Depending on the color you want you will output different color based on the sensor value to each color pin. You will probably need a resistance on the negative pin of your led.

Link to comment
Share on other sites

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×