sexta-feira, 1 de março de 2013

TUTORIAL - Blinking an LED with an Arduino

BLINKING AN LED USING AN ARDUINO

Well, this will be my first tutorial, so I think we should start with an Arduino project like blinking a LED.

A LED is a Light-Emiting-Diode, so it has a a cathode and an anode.. Like you can see in the image, tha Anode is the longest lead and it is the positive pole of the diode..

Material we need:

1 - Arduino with USB cable
1 - LED
1 - Breadboard
1 - Resistor 330 ohms

The schematics is very simple:

- put the LED with the anode in the positive row (red) of the breadboard and the cathode in the negative row (blue);
- use the 330ohm resistor to connect the anode to the digital pin 8 of the arduino
- use one wire to connect the negative row to ground.


Now it's time to work on the sketch (Arduino code).
Open the software (you can download it from http://arduino.cc/en/Main/Software.
And write the following sketch


I hope you enjoyed your first tutorial with the Arduino..
As you can see it is very simple. In some other tutorials you will see people using the LED directly on the arduino without resistor, because they are connecting it to the digital 13 (it has already a resistor in it)
I didn't use that so you get a little bit more used to breadboards and to wires..

Give me your feedback ;)







Sem comentários:

Enviar um comentário