Project showcase
5 Blinking LEDs

5 Blinking LEDs © MPL-2.0

Simply, this is 5 LEDs in a row that blinks!

  • 16,508 views
  • 0 comments
  • 9 respects

Components and supplies

Apps and online services

About this project

Code

5 Blinking LedsArduino
copy paste on arduino program
/*
  Blinking LEDs - test program to run 3 LEDs in a pattern of blinks
*/

int led1 = 0;
int led2 = 1;
int led3 = 2;
int led4 = 3;
int led5 = 4;

// the setup routine runs once when you press reset:
void setup() {                
  // initialize the digital pin as an output.
  pinMode(led1, OUTPUT);   
  pinMode(led2, OUTPUT);  
  pinMode(led3, OUTPUT);    
  pinMode(led4, OUTPUT);
  pinMode(led5, OUTPUT);
}

// the loop routine runs over and over again forever:
void loop() {
  digitalWrite(led1, HIGH);   // turn the LED on (HIGH is the voltage level)
  delay(80);                      // wait for 1/2 a second
  digitalWrite(led1, LOW);    // turn the LED off by making the voltage LOW
  digitalWrite(led2, HIGH);    // turn the LED on (HIGH is the voltage level)
  delay(80);                      // wait for 1/2 a second
  digitalWrite(led2, LOW);     // turn the LED off by making the voltage LOW
  digitalWrite(led3, HIGH);     // turn the LED on (HIGH is the voltage level)
  delay(80);                      // wait for 1/2 a second
  digitalWrite(led3, LOW);      // turn the LED off by making the voltage LOW
  digitalWrite(led4, HIGH);     // turn the LED on (HIGH is the voltage level)
  delay(80);                      // wait for 1/2 a second
  digitalWrite(led4, LOW);      // turn the LED off by making the voltage LOW
  digitalWrite(led5, HIGH);     // turn the LED on (HIGH is the voltage level)
  delay(80);                      // wait for 1/2 a second
  digitalWrite(led5, LOW);      // turn the LED off by making the voltage LOW
  delay(500);                     // wait for a second
}

Schematics

5 Blinking Leds
Blinking leds bb v9tokph0bw

Comments

Similar projects you might like

Blinking LEDs with Arduino

Project tutorial by Super Kid

  • 4,258 views
  • 2 comments
  • 18 respects

Blinking LEDs on Arduino from iOS and Android

Project tutorial by Alex Jonsson

  • 17,907 views
  • 8 comments
  • 61 respects

DHT11 Sensor with LEDs and a Piezo Speaker

Project tutorial by Tech with Matthew

  • 12,513 views
  • 4 comments
  • 24 respects

Turn LEDs On/Off via Remote Control

Project tutorial by ismystore

  • 9,817 views
  • 1 comment
  • 8 respects

Arduino Door Bell with 3 LEDs

Project showcase by abhishekghosh

  • 5,583 views
  • 2 comments
  • 8 respects

tinyGlow Smart LEDs

by Alex Glow

  • 5,912 views
  • 3 comments
  • 27 respects
Add projectSign up / Login