Difference between revisions of "NodeMCU: Blink"
Jump to navigation
Jump to search
Onnowpurbo (talk | contribs) (Created page with " #define LED D0 // Led in NodeMCU at pin GPIO16 (D0). void setup() { pinMode(LED, OUTPUT); // LED pin as output. } void loop() { digitalWrite(LED,...") |
Onnowpurbo (talk | contribs) |
||
| Line 13: | Line 13: | ||
delay(1000); // wait for 1 second. | delay(1000); // wait for 1 second. | ||
} | } | ||
| + | |||
| + | |||
| + | |||
| + | ==Pranala Menarik== | ||
| + | |||
| + | * [[NodeMCU]] | ||
Latest revision as of 11:38, 7 May 2023
#define LED D0 // Led in NodeMCU at pin GPIO16 (D0).
void setup() {
pinMode(LED, OUTPUT); // LED pin as output.
}
void loop() {
digitalWrite(LED, HIGH);// turn the LED off.(Note that LOW is the voltage level but actually
//the LED is on; this is because it is acive low on the ESP8266.
delay(1000); // wait for 1 second.
digitalWrite(LED, LOW); // turn the LED on.
delay(1000); // wait for 1 second.
}