Skip to content

Instantly share code, notes, and snippets.

@zamfi

zamfi/seconds.ino

Created Dec 3, 2015
Embed
What would you like to do?
const int numPins = 12;
const int pins[] = {2,3,4,5,6,7,8,9,10,11,12,13};
void setup() {
for (int i = 0; i < numPins; ++i) {
pinMode(pins[i], OUTPUT);
}
}
int litPin = 0;
void loop() {
digitalWrite(pins[litPin], LOW);
litPin = (litPin + 1) % numPins;
digitalWrite(pins[litPin], HIGH);
delay(1000);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.