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



  • 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?


  • administrators

    @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



  • 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


Log in to reply
 

Pycom on Twitter