Skip to content

Instantly share code, notes, and snippets.

@odds-get-evened
Created January 25, 2025 20:22
Show Gist options
  • Save odds-get-evened/7c1998b1d79210dc6625a678a9c66dab to your computer and use it in GitHub Desktop.
Save odds-get-evened/7c1998b1d79210dc6625a678a9c66dab to your computer and use it in GitHub Desktop.
test ESP32 Feather Arduino IDE C code
void setup() {
// init built-in LED pin as output
pinMode(LED_BUILTIN, OUTPUT);
// init USB serial converter so we have a port created
Serial.begin(115200);
// optional but IMPORTANT
// wait for the serial port to be ready (good for debugging)
while(!Serial) {; /* wait for serial connection */ }
Serial.println("setup has completed.");
}
void loop() {
Serial.println("LED on");
digitalWrite(LED_BUILTIN, HIGH); // tun LED on (HIGH is voltage)
delay(1000);
Serial.println("LED off");
digitalWrite(LED_BUILTIN, LOW); // turn the LED off
delay(3000);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment