Controlling an External LED
In this project, you'll learn how to connect and control an external LED.
Before you do this project, you'll first need to know how to use a breadboard, and how a LED works
Parts needed:
| ![]() ![]() ![]() ![]() ![]() | |
To turn on and off a LED using the Arduino, we need to connect one leg of the LED to a digital I/O pin on the Arduino board. The pins labeled 2 to 13 on the Arduino board are the digital I/O pins. | ![]() | |
1 | Making the connections
| ![]() |
2 | Create a new program by selecting File from the menu,
and then select New. You will see this new template. | ![]() |
3 | Type in this program.
The The The 1000 ms = 1 sec | ![]() |
4 | Upload and run the program. You should see the external LED blink on for 1 second and then off for another second. | |
How (not) to blow up a LED. If you have not read the document on how a LED works then you should read it before going any further, otherwise you'll end up with a lot of blown up LEDs. | ![]() | |