first commit
This commit is contained in:
21
ESP8266_BLINK/ESP8266_BLINK.ino
Executable file
21
ESP8266_BLINK/ESP8266_BLINK.ino
Executable file
@@ -0,0 +1,21 @@
|
||||
#include <ESP8266WiFi.h>
|
||||
|
||||
|
||||
int ledPin = 2;
|
||||
void setup() {
|
||||
pinMode(ledPin, OUTPUT);
|
||||
Serial.begin(9600);
|
||||
|
||||
}
|
||||
|
||||
void loop() {
|
||||
digitalWrite(ledPin, HIGH); // turn the LED on (HIGH is the voltage level)
|
||||
delay(1000); // wait for a second
|
||||
digitalWrite(ledPin, LOW); // turn the LED off by making the voltage LOW
|
||||
Serial.println("Go to sleep");
|
||||
delay(1000); // wait for a second
|
||||
// ESP.deepSleep(20e6); // 20e6 is 20 microseconds
|
||||
// ESP.deepSleep(6000000, WAKE_RF_DEFAULT); // Sleep for 6 seconds
|
||||
delay(1000);
|
||||
delay(100);
|
||||
}
|
||||
Reference in New Issue
Block a user