I am using a ESP8266 WEMOS D1 mini using vanilla micropython.
I have written a program that uses an endless loop of
connecting to wifi -> reading a sensor -> publishing the sensor data by mqtt-> then entering a deep sleep using
Code: Select all
rtc = machine.RTC() rtc.irq(trigger=rtc.ALARM0, wake=machine.DEEPSLEEP) rtc.alarm(rtc.ALARM0, 300000) machine.deepsleep()
However, if it want to stop the program running, and adjust some parameters, I hit a problem.
I cannot connect to the dev board via USB serial port (using rshell). Presumably because the code is running or the esp is in deep sleep.
I have no idea how to deal with the obvious issue. Should I include something in the script to allow me to stop the code running?