Created
July 18, 2016 18:01
-
-
Save drews256/f774089816df8aaf07003a6f53aa99a5 to your computer and use it in GitHub Desktop.
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
/* | |
ESP8266 Blink by Andrew Stuntz | |
The LED is connected to GPIO pin 5 in this case. | |
Written for the ESP8266 ESP-07 version of this board. | |
*/ | |
void setup() { | |
pinMode(5, OUTPUT); // Initialize the LED_BUILTIN pin as an output | |
Serial.begin(115200); | |
} | |
// the loop function runs over and over again forever | |
void loop() { | |
digitalWrite(5, LOW); // Turn the LED on (Note that LOW is the voltage level | |
// but actually the LED is on; this is because | |
// it is acive low on the ESP-01) | |
delay(1000); // Wait for a second | |
Serial.print("High"); | |
Serial.println(); | |
digitalWrite(5, 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