Last active
February 28, 2016 09:32
-
-
Save smching/99fedd9d3ad3d2fb549f to your computer and use it in GitHub Desktop.
8 LEDs light up in sequence
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
int gpioCount=8; | |
int led_pin[9]={16,14,12,13,2,5,4,1}; | |
void setup() { | |
for (byte i=0; i<gpioCount; i++) { | |
pinMode(led_pin[i], OUTPUT); | |
} | |
} | |
void loop() { | |
for (byte i=0; i<gpioCount; i++) { | |
digitalWrite(led_pin[i], LOW); //turn LED on, it is acive low on the ESP-07 | |
delay(250); | |
digitalWrite(led_pin[i], HIGH); | |
delay(250); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment