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

    Main.py seems to be updating, but isn't!

    Scheduled Pinned Locked Moved LoPy
    bugs
    3 Posts 3 Posters 620 Views 3 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
      cclawton
      last edited by

      I've been working on a script:
      https://github.com/cclawton/lopy4-pysense-ttn-aws-bidrectional

      that sends a temperature payload up to TTN and will receive a code and set LED based on the byte sent.

      It all works well in interactive mode out of Atom with Pymakr.

      When copy the script text into the main.py that comes with the PyBytes stuff (below the "Please put your USER code below this line" bit) and adjust for indents etc., the upload of the main.py works as expected from Atom.

      BUT when I boot the LoPy its still running the original main.py. I know this because the updated script has a different print statement before the "USER code" bit. and I can see the old script print output in the Atom console.

      I've downloaded the flash to a new directory and the main.py is the correct updated one.

      I'm sure it's something simple.... but it's doing my head in. Any ideas?

      J X 2 Replies Last reply Reply Quote 0
      • J Offline
        jmarcelino @cclawton
        last edited by

        Hi @cclawton,

        Just to help me understand did you write the original main.py you're referring to or is this a system default one?

        Thank

        1 Reply Last reply Reply Quote 0
        • X Offline
          Xykon administrators @cclawton
          last edited by

          @cclawton Please download the latest library inside Pybytes, there have been some updates to the main.py

          It is also recommended that, when working with the Pybytes firmware, you start with the main.py_example1 file in the flash/examples directory instead of the full main.py

          Christian Ehlers

          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