terça-feira, 5 de março de 2013

TUTORIAL - LED Ambient Light

ARDUINO LED MOOD LIGHT


Last week you learnt how to control LED's with your Arduino, that's why this tutorial is interesting. Perhaps you thought that you couldn't do anything with last week's tutorials, but this is the proof that you really can do funny things.

What you need:

3 LED's (green, blue and red) -> I used 3mm high intensity LEDs but you can use any other LED's;
2 resistors (330ohm);
1 resistor (120ohm);
1 Arduino;
and some wires

With these components, all you have to do is to take your LEDs and put them on the breadboard with the cathodes all on the same row. You will connect this row on the ground from your Arduino.
Now you take the resistors and you'll use them to connect the red LED's anode to pin number 9, the green one to pin number 10 and the blue one to pin number 11. Use the 120 ohm resistor on the green LED and the 330ohm resistors on the blue and red LEDs.
I chose these resistors because the green light wasn't strong enough.



Now try to use this sketch:



And this is what you should get:
the white box is nothing more than an A4 paper sheet that I bended into some sort of cube.



Sem comentários:

Enviar um comentário