Creating Double LED blink program using Arduino UNO
Required Components
- Led -2 no
- Resistor 220Ω -2 no
- Arduino board -1 no
- Bread Board -1 no
- Connecting wires -1 set
Circuit
Steps
- Make sure the components are working properly.
- Connect Arduino board 5v and GND pin to the bread board by using wires.
- Connect 220 Ω Resistors to the each LED Anode (+) pin and both cathode (-) pin to Gnd.
- Connect Arduino 9, 10 pin to the each 220 Ω Resistors another end.
- Check the Arduino program.
- Check the circuit connections.
- Run the Arduino program.
Arduino Program
int led1 = 9;
int led2 = 10;
void setup()
{
pinMode (led1, OUTPUT);
pinMode (led2, OUTPUT;
}
void loop()
{
digitalWrite (led1, LOW);
digitalWrite (led2, HIGH);
delay (500);
digitalWrite (led1, HIGH);
digitalWrite (led2, LOW);
delay (500);
}
Usage
- Reading lights.
- Night lights.
- Security lights.