Over here: LED Lights and Electricity we used a battery and a resistor to light an LED.
We can now try the same thing using the Arduino micro-controller.All that we will do is use the Arduino’s power instead of the battery. The arduino is working on exactly the same idea as our simple LED circuit- everything we make uses and plays with this flow of electricity.
Take the USB cord and plug in your arduino to a usb port on your computer.
You will notice that the Arduino lights up two tiny built in LEDS to tell you its working.
If something is flashing we have a problem – talk to your tutor.
Bend the long leg of your LED so its stick out sideways and put the other leg in the Arduino port that says ‘GND’ or ground (there are three to choose from). This is the same as the negative terminal on your battery.
Now place one end of the resistor into the port/plug that says 5V (thats like the positive terminal of the battery – here we have 5V instead of 9V.
Now touch the other end of the resistor to the long leg of the LED – and let there be light!
The exact same thing is happening here as with the 9v battery. Here however the power is coming through your computers USB port to your arduino.