[SOLVED] script that behave differently when launched from main.py than from rrepl.
Posted: Thu Dec 15, 2016 4:16 pm
I have a script that behave differently when launched from main.py than from rrepl.
I run the dailybuild firmware "mp-esp8266-firmware-latest.bin" downloaded on 14/12/16 on a "nodemcu V3"
I have a script based on example_sub_led.py from umqtt library:
https://github.com/micropython/micropyt ... sub_led.py
I can run it from webrepl:
import example_sub_led.py
example_sub_led.main()
Note: main() doesn't start automaticaly when importing the module, is this normal ?
But, if I call it from the main.py, it doesn't work, it doesn't respond to publication to the topic, and of course I can't see what happen because the infinite loop eat 100% of the cpu so I can't log with webrep in the same time.
I have attached the sources files to help investigate if some can help?
Thanks Pidou46
I run the dailybuild firmware "mp-esp8266-firmware-latest.bin" downloaded on 14/12/16 on a "nodemcu V3"
I have a script based on example_sub_led.py from umqtt library:
https://github.com/micropython/micropyt ... sub_led.py
I can run it from webrepl:
import example_sub_led.py
example_sub_led.main()
Note: main() doesn't start automaticaly when importing the module, is this normal ?
But, if I call it from the main.py, it doesn't work, it doesn't respond to publication to the topic, and of course I can't see what happen because the infinite loop eat 100% of the cpu so I can't log with webrep in the same time.
I have attached the sources files to help investigate if some can help?
Thanks Pidou46