Skip to content

Instantly share code, notes, and snippets.

@li2hub
Last active August 14, 2018 11:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save li2hub/bf26674bd7ac61255fbcdd020d0d3482 to your computer and use it in GitHub Desktop.
Save li2hub/bf26674bd7ac61255fbcdd020d0d3482 to your computer and use it in GitHub Desktop.
void setup() {
pinMode(LED_BUILTIN, OUTPUT); // Initialize the LED_BUILTIN pin as an output
//This pin is internally connected to the on-board LED
}
// 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 the LED on the NodeMCU is active low)
delay(1000); // 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