When I include a while True:
in my main.py
I can no longer overwrite it and upload a new version.
Many beginner guides and tutorials, eg: this one and this one, use while True
. So I guess it should be possible.
I have tried using Thonny and ampy
for uploading (overwriting) main.py while the board was running the endless loop.
My current workaround is connecting to the REPL using picocom
and deleting the file using os.remove
.
Micropython version: esp8266-20210618-v1.16
NB. I know that timers can mitigate the need for an endless loop.