Last active
October 21, 2019 10:02
-
-
Save techzeero/1c5f5b7cbe4c1380f65e49cc26c00f2e to your computer and use it in GitHub Desktop.
Multiple LEDs With Arduino. https://techzeero.com/arduino-tutorials/multiple-leds-blinking-using-arduino/
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Controlling Multiple LEDs With an Arduino | |
For more details, visit: https://techzeero.com/arduino-tutorials/multiple-leds-blinking-using-arduino/ | |
*/ | |
void setup() | |
{ | |
pinMode(7, OUTPUT); | |
pinMode(6, OUTPUT); | |
pinMode(5, OUTPUT); | |
pinMode(4, OUTPUT); | |
pinMode(3, OUTPUT); | |
} | |
void loop() | |
{ | |
digitalWrite(7, HIGH); | |
digitalWrite(6, HIGH); | |
digitalWrite(5, HIGH); | |
digitalWrite(4, HIGH); | |
digitalWrite(3, HIGH); | |
delay(200); // Wait for 200 millisecond(s) | |
digitalWrite(7, LOW); | |
delay(200); // Wait for 200 millisecond(s) | |
digitalWrite(6, LOW); | |
digitalWrite(7, HIGH); | |
delay(200); // Wait for 200 millisecond(s) | |
digitalWrite(5, LOW); | |
digitalWrite(6, HIGH); | |
delay(200); // Wait for 200 millisecond(s) | |
digitalWrite(4, LOW); | |
digitalWrite(5, HIGH); | |
delay(200); // Wait for 200 millisecond(s) | |
digitalWrite(3, LOW); | |
digitalWrite(4, HIGH); | |
delay(200); // Wait for 200 millisecond(s) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment