Creating three LED blink program using Arduino UNO
Required Components
- LED -3 no
- Resistor 220Ω -3 no
- Arduino UNO 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 breadboard by using wires.
- Connect 220 Ω Resistors to the each LED Anode (+) pin and both cathode (-) pin to GND through breadboard.
- Connect Arduino 11, 12, 13 pin to the 220 Ω Resistors another end.
- Check the Arduino program.
- Check the circuit connections.
- Run the Arduino program.
Arduino Program
int led1=11;
int led2=12;
int led3=13;
void setup ( )
{
pinMode (led1, OUTPUT);
pinMode (led2, OUTPUT;
pinMode (led3, OUTPUT);
}
void loop ( )
{
digitalWrite (led1, HIGH);
digitalWrite (led2, LOW);
digitalWrite (led3, LOW);
delay (1000);
digitalWrite (led3, LOW);
digitalWrite (led1, LOW);
digitalWrite (led2, HIGH);
delay (1000);
digitalWrite (led1, LOW);
digitalWrite (led2, LOW);
digitalWrite (led3, HIGH);
delay (1000);
}
Usage
- Focused lights.
- Residential and business lighting.
- Desk lamps.
- Lighting for signage.