Introduction: How to Make a LED Blink
Hello, I am Jackson. I am going try and teach how to make a light emitting diode (LED) blink. This has many uses, this will be to impress people and to teach the basics of Arduino programming. In the professional field, LEDs are used in every day objects ranging from flashlights to the giant score boards seen at sports games.
Step 1: Materials
Arduino Uno board
USB 2.0 cable
Any color LED
4 wires (1 long, 3 medium)
Step 2: Board Build
The first step is to hook up the ground (blue -) on one side of the breadboard to the other ground (blue -) on the other; do the same with the positives (red +). Do this at the bottom of the board to have ample room and use 2 medium wires.
Step 3: Inserting the LED
Next, put the led in the board by putting the flag side in front the other lead in the board. The other end of it goes into a nearby empty hole in the board. It does not go into the positive. The flag of the led is found in the colored area.
Step 4: Resistor
For the third step, put the 10k resistor in the hole right next to the resistor. This should be lined up so it makes a single file line (flag in ground, other end in an empty space, resistor,). The resistor does not have a positive or negative so it does not matter which end is near the non-flag lead of the led.
Step 5: Arduino Uno Board
Now move to the Arduino board. On one side of the board, there will be numbers going from 13 down to 1. We will be using number 13. Put one end of the long wire in the 13 hole and the other in-line with the resistor.
Step 6: Grounding the Board
On the other side of the Arduino board, there will be more holes and more words to read. Find the 5v and GND slots. Grab the last medium wire and put it into the GND slot.
Step 7: Arduino to Breadboard
Once the last wire is in the Arduino, place the other end of the GND wire into the blue ground on the breadboard. Now the breadboard and Arduino board should be set up properly.
Step 8: Programming
First, open the Arduino program. Above the “void setup”, type this:
This tells the program that slot 13 on the Arduino board is now renamed as led. The semicolon is super important. Without it, the program will come with errors. The semicolon basically tells the program to stop and read a new line.
Now, for the second part. Under void setup, type this between the curly brackets:
This tells the program that led is an output. Capitalization and spelling are extremely important.
We now land into the third part; the void loop.The void loop function runs whatever is in the curly brackets forever until the board loses power or is stopped. In between the curly brackets, type this:
Digital Write led low tells the program that the light should be off, digital write high tells the program that the led will be on, and the delay tells it how long to wait before the next line is activated. Delay is set to milliseconds; 1000 milliseconds is 1 second; this can be set to anything above 15. Save the program by pressing the check mark up in the left hand corner in the program.
Step 9: Plugging in the Arduino
Finally the programming, and prepping the board is done. The last, and final, step is to plug in the Arduino board and upload the program. Grab the USB 2.0 cable and plug the half oval end into the corresponding plugin on the Arduino board and the USB end into the computer’s USB slot. Once its plugged in, there should be a light flash on the Arduino board. This is the built-in led.
Step 10: Uploading the Program
Now upload the program to the board by pressing the right arrow up in the left hand corner of the program; this should be right next to the check mark. If all of this has been set up right, your led should now be turning on and off at a one second interval.