Little Bird Curriculum / code littlebird.com.au
eagled-sequence-3d.ino Arduino (C/C++) 13 lines · 0 views ✦ Open in English IDE Raw Download Embed view
const byte LED_PINS[] = {7, 3, 10, 0, 1, 12, 6};
const byte LED_COUNT = sizeof(LED_PINS) / sizeof(LED_PINS[0]);
const unsigned long STEP_MS = 250;
void setup() {
  for (byte i = 0; i < LED_COUNT; i++) pinMode(LED_PINS[i], OUTPUT);
}
void loop() {
  for (byte i = 0; i < LED_COUNT; i++) {
    digitalWrite(LED_PINS[i], HIGH);
    delay(STEP_MS);
    digitalWrite(LED_PINS[i], LOW);
  }
}

Embed this snippet

As an iframe:

Or drop it inline with a script tag (injects the highlighted block where included):

Shared from Little Bird Electronics curriculum.

Copied to clipboard