Restarting code without reset button or power-cycle
-
Hi,
I have some code on a Lopy with a boot.py and a main.py. I can ftp into the Lopy over WiFi and upload a new version of the code. I can connect with telnet and see console output over WiFI. What I cannot figure out is how I can execute a new version of the main.py that I have uploaded. When I press the reset button (physically) or cycle power, it will run the new code, but I want to trigger this through telnet.
Any tips?
Thanks
Christian
-
@christian_kohler
The documentation is your friend:import machine machine.reset()See: https://docs.pycom.io/chapter/firmwareapi/pycom/machine/
-
@robert-hh Thanks, that is perfect.
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login