Created
June 4, 2024 10:46
-
-
Save shamasis/fa7e6a91ec4e4afb78ddd9fa60b7fbf5 to your computer and use it in GitHub Desktop.
Sample sketch that blinks ESP32 built-In LED to smoke test everything works
This file contains 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
/* | |
ESP 32 Blink | |
Turns on an LED on for one second, then off for one second, repeatedly. | |
The ESP32 has an internal blue LED at D2 (GPIO 02) | |
*/ | |
// int LED_BUILTIN = 2; | |
void setup() | |
{ | |
pinMode(LED_BUILTIN, OUTPUT); | |
} | |
void loop() | |
{ | |
digitalWrite(LED_BUILTIN, HIGH); // turn the LED on (HIGH is the voltage level) | |
delay(1000); // wait for a second | |
digitalWrite(LED_BUILTIN, LOW); // turn the LED off by making the voltage LOW | |
delay(1000); // wait for a second | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment