Run script on boot for LopY
-
Hi,
My wish is to run a script on the boot of the LoPy, when I plug it in USB for example, without any action of the user.
The LoPy is not running boot.py file when it is plugged to a power source ? What is the best way to do ?
All the best.
-
@livius said in Run script on boot for LopY:
@gouao
as you can see your boot file was run - because you have repl
did you try my advice from second post - to put code not to boot.py only inside main.py and see if you do not got script error?Only the COM commection argumens in the boot.py, and the script in main.py.
What the sync is really doing on the project ?
-
@gouao
as you can see your boot file was run - because you have repl
did you try my advice from second post - to put code not to boot.py only inside main.py and see if you do not got script error?
-
@livius said in Run script on boot for LopY:
@gouao
can you conect to it by COM - e.g. by putty
and sendos.uname()
?If yes then it run boot.py (if you have it default)
There you go :
"(sysname='LoPy', nodename='LoPy', release='1.3.0.b1', version='v1.8.6-379-gc44eb ac on 2017-01-13', machine='LoPy with ESP32')"
-
I suppose that you modify boot.py and have error inside
then you do not know that it is tried to run without succesfullbetter is to put something in main.py
then you can see output about error in UART repl - e.g. in putty
-
@gouao
can you conect to it by COM - e.g. by putty
and sendos.uname()
?If yes then it run boot.py (if you have it default)
-
@gouao if the board isn't behaving as it should, best thing to do is reflash the latest firmware.
-
@livius said in Run script on boot for LopY:
sequence is as follow:
Sure, so the lopy should run boot.py and main.py after plugging power.
But it doesn't
-