Welcome to the Pycom forum Forum
    • \[\[global:header.categories\]\]
    • \[\[global:header.recent\]\]
    • \[\[global:header.tags\]\]
    • \[\[global:header.popular\]\]
    • Login

    Explore Pybytes | Official Documentation | Report a Firmware Bug/Issue | GitHub

    Restarting code without reset button or power-cycle

    Scheduled Pinned Locked Moved LoPy
    lopyresetwifi
    3 Posts 2 Posters 901 Views 2 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • C Offline
      christian_kohler
      last edited by

      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

      robert-hhR 1 Reply Last reply Reply Quote 0
      • robert-hhR Offline
        robert-hh @christian_kohler
        last edited by robert-hh

        @christian_kohler
        The documentation is your friend:

        import machine
        machine.reset()
        

        See: https://docs.pycom.io/chapter/firmwareapi/pycom/machine/

        C 1 Reply Last reply Reply Quote 0
        • C Offline
          christian_kohler @robert-hh
          last edited by

          @robert-hh Thanks, that is perfect.

          1 Reply Last reply Reply Quote 0

          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
          • 1 / 1
          • First post
            Last post

          Pycom on Twitter

          Pycom