Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
The ability to flash an LED is the most basic hello world type of program you can write and run on your
arduino.
Most Arduinos have an LED attached to D13, rather than take the easy option we will attach an LED
externally to the Arduino, if you wish to flash the LED on the board skip to the code and then change the led
value as explained at the end of the article
Parts List
Here are the parts you will require
1 Arduino UNO or equivalent
1 LED
1 470 ohm resistor
1 Breadboard to build the circuit
Wires to connect the LED resistor to the Arduino
Here is what you will build, watch the polarity of the LED, the image below shows how to tell the positive
(anode) and negative (cathode) apart.
LED polarity
As you can see the cathode is connected to the GND on the Arduino.
Incidentally if you wish to switch the LED on the board on and off change int ledPin value to 13