Skip to content

Instantly share code, notes, and snippets.

@smching
Last active February 28, 2016 09:32
Show Gist options
  • Save smching/99fedd9d3ad3d2fb549f to your computer and use it in GitHub Desktop.
Save smching/99fedd9d3ad3d2fb549f to your computer and use it in GitHub Desktop.
8 LEDs light up in sequence
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