Last active
September 29, 2018 19:25
-
-
Save meauris/9746ca6b82191ad3431703fa3f7f3ec5 to your computer and use it in GitHub Desktop.
Edited version of the original blink example for ESP8266
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
void setup() { | |
pinMode(LED_BUILTIN, OUTPUT); // Initialize the LED_BUILTIN pin as an output | |
} | |
// the loop function runs over and over again forever | |
void loop() { | |
digitalWrite(LED_BUILTIN, LOW); // Turn the LED on (Note that LOW is the voltage level | |
// but actually the LED is on; this is because | |
// it is active low on the ESP-01) | |
delay(500); // Wait for a second | |
digitalWrite(LED_BUILTIN, HIGH); // Turn the LED off by making the voltage HIGH | |
delay(500); // Wait for two seconds (to demonstrate the active low LED) | |
digitalWrite(LED_BUILTIN, LOW); // Turn the LED on (Note that LOW is the voltage level | |
delay(500); // Wait for a second | |
digitalWrite(LED_BUILTIN, HIGH); // Turn the LED off by making the voltage HIGH | |
delay(2000); // Wait for two seconds (to demonstrate the active low LED) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment