Created
January 25, 2025 20:22
-
-
Save odds-get-evened/7c1998b1d79210dc6625a678a9c66dab to your computer and use it in GitHub Desktop.
test ESP32 Feather Arduino IDE C code
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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