Skip to content

Instantly share code, notes, and snippets.

@JeffersGlass
Created May 17, 2020 22:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save JeffersGlass/af9bc2787a64b8431aab1c97208db99a to your computer and use it in GitHub Desktop.
Save JeffersGlass/af9bc2787a64b8431aab1c97208db99a to your computer and use it in GitHub Desktop.
int leds[] = {9, 10, 11, 12, 13};
const int NUMLEDS = 5;
void setup() {
// put your setup code here, to run once:
for (int i = 0; i < NUMLEDS; i++){
pinMode(leds[i], OUTPUT);
digitalWrite(leds[i], LOW);
}
}
void loop() {
// put your main code here, to run repeatedly:
for (int i = 0; i < NUMLEDS; i++){
digitalWrite(leds[i], HIGH);
delay(500);
digitalWrite(leds[i], LOW);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment