Skip to content

Instantly share code, notes, and snippets.

@drews256
Created July 18, 2016 18:01
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save drews256/f774089816df8aaf07003a6f53aa99a5 to your computer and use it in GitHub Desktop.
Save drews256/f774089816df8aaf07003a6f53aa99a5 to your computer and use it in GitHub Desktop.
/*
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