ESP8266: instead of main.py start from REPL an script
Posted: Sat Jun 29, 2019 11:32 am
Hi,
I do a lot of try-and-error coding. Means I write a main.py and flash it on the ESP8266 with ampy. The issue is: after rebooting the ESP8266, the main.py may be started but I cannot see any error messages while main.py is executed.
It would be much better, if I access with picocom the REPL first and start from there the main.py.
My first attempt was to rename the main.py, so it doesn't get started automatically. Then I logged into the REPL with picocom, loaded os and tried os.system("main_new_name.py") ... well but os.system isn't available in µPython.
Anyhow: what is the correct approach to test µPyhton-Skripts on the ESP8266, in a way I can see in a terminal all the errors?
In advance: thanks for all your support
(Note: already searched the forum for similar issues, e.g. with the term "execute scripts" but found nothing appropriate)
I do a lot of try-and-error coding. Means I write a main.py and flash it on the ESP8266 with ampy. The issue is: after rebooting the ESP8266, the main.py may be started but I cannot see any error messages while main.py is executed.
It would be much better, if I access with picocom the REPL first and start from there the main.py.
My first attempt was to rename the main.py, so it doesn't get started automatically. Then I logged into the REPL with picocom, loaded os and tried os.system("main_new_name.py") ... well but os.system isn't available in µPython.
Anyhow: what is the correct approach to test µPyhton-Skripts on the ESP8266, in a way I can see in a terminal all the errors?
In advance: thanks for all your support
(Note: already searched the forum for similar issues, e.g. with the term "execute scripts" but found nothing appropriate)