Last active
May 15, 2019 03:55
-
-
Save vaibhavpandeyvpz/d929ed291111aba0eee5a69134c17bf3 to your computer and use it in GitHub Desktop.
Getting Started To Use NodeMCU (ESP8266) With Arduino IDE: http://blog.vaibhavpandey.com/2018/09/getting-started-to-use-esp8266-nodemcu.html
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
int BLINK_SPEED_MS = 250; | |
int PIN_N = 15; | |
void setup() { | |
// put your setup code here, to run once: | |
pinMode(PIN_N, OUTPUT); | |
} | |
void loop() { | |
// put your main code here, to run repeatedly: | |
delay(1000); // pause for a second | |
for (int i = 0; i < 5; i++) { | |
blink(BLINK_SPEED_MS); // blink 5 times | |
} | |
} | |
void blink(int wait) { | |
digitalWrite(PIN_N, HIGH); // supply voltage to pin | |
delay(wait); // wait | |
digitalWrite(PIN_N, LOW); // power down | |
delay(wait); // wait | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment