Skip to content

Instantly share code, notes, and snippets.

@maliqq
Last active March 13, 2026 00:10
Show Gist options
  • Select an option

  • Save maliqq/74fc1f62a9ec7882b8c758b70d912b44 to your computer and use it in GitHub Desktop.

Select an option

Save maliqq/74fc1f62a9ec7882b8c758b70d912b44 to your computer and use it in GitHub Desktop.
const int pins[] = {8, 2, 3, 4, 5, 6, 7, 9, 10};
const int count = sizeof(pins) / sizeof(pins[0]);
void setup() {
Serial.begin(115200);
delay(1000);
Serial.println("booted");
for (int i = 0; i < count; i++) {
pinMode(pins[i], OUTPUT);
digitalWrite(pins[i], LOW);
}
}
void loop() {
for (int i = 0; i < count; i++) {
Serial.print("Trying GPIO ");
Serial.println(pins[i]);
digitalWrite(pins[i], HIGH);
delay(500);
digitalWrite(pins[i], LOW);
delay(200);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment