Dependancies
Pre-requisites
Buy the components
wakeup-periodically.ino
#include <ESP8266WiFi.h>
void setup() {
Serial.begin(115200);
while(!Serial) { }
Serial.println("\nI'm awake !!");
Serial.println("Doing the task...");
Serial.println("Going into deep sleep for 10s...");
ESP.deepSleep(10e6);
}
void loop() {
}
BOARD?=esp8266com:esp8266:d1_mini
PORT?=/dev/cu.wchusbserial1410
BUILD=build
# Arduino CLI version 0.14.0 is used.
.PHONY: default lint all flash clean
default: lint all flash clean
lint:
cpplint --extensions=ino --filter=-legal/copyright *.ino
all:
arduino-cli compile --fqbn $(BOARD) --output-dir $(BUILD) ./
flash:
arduino-cli upload --fqbn $(BOARD) --port $(PORT) --input-dir $(BUILD)
clean:
rm -r build
Wake up periodically after a specified time. Short RST
and GPIO012
on ESP (or D6
on WeMos).