How to control LED lights with an Arduino, simple project with code

How to control LED with Arduino
How to control LED lights with an Arduino | simple project with code

The Arduino LED blinking control project is the easiest project for beginners learning Arduino programming. The blinking of LEDs is controlled smoothly.
This simple project can be used to create a range of electronic innovations, such as traffic lights and other creative applications.
In this article, we’ll walk you through how to control LED lights with an Arduino, step by step.

Electronic components that we need:

  • 3 LEDs
  • 3 resistors (220 Ohm)
  • Electrical wires
  • Arduino UNO
  • Breadboard

Circuit diagram:

Arduino Programming Code:

int LED1 = 10;
int LED2 = 11;
int LED3 = 12;
// by www.andprof.com
void setup() {
// put your setup code here, to run once:
pinMode(LED1,OUTPUT);
pinMode(LED2,OUTPUT);
pinMode(LED3,OUTPUT);
}

void loop() {
// put your main code here, to run repeatedly:
digitalWrite(LED1,HIGH);
delay(100);
digitalWrite(LED2,HIGH);
delay(100);
digitalWrite(LED3,HIGH);
delay(100);

digitalWrite(LED1,LOW);
delay(100);
digitalWrite(LED2,LOW);
delay(100);
digitalWrite(LED3,LOW);
delay(100);
}

Explanatory Video:

how to control LED lights with Arduino | Top Arduino project for beginners

Previous articleUltrasonic Sensor HC-SR04 | Arduino Project With Code
Next articleHow to make fire detector using arduino and Flame Sensor