Hello all! I have begun working my way through the MicroPython Programming e-book and got stumped. I am using an EPS-32 Node-MCU. When I first tried the Blink.py program, it worked just as expected. However, when I modify it by reducing the sleep time (for a faster blink rate), I can’t get it to run the modified program.
I am using uPyCraft and pressing ‘STOP’, then ‘Download and run’, then ‘STOP’ and press the ‘EN’ button, but the earlier version of the program is what runs, not the modified version.
What am I missing?
I think what might be happening is that the code is not being uploaded to the board. Also, to make sure it runs on your ESP32 board when it resets (when you press the RST/EN button), the file uploaded to the board should be called main.py, or boot.py so that it runs automatically on your ESP32.
If you save the file with any other name, it will only run temporarily if you click the run button on the IDE.
To make sure your changes were saved on your board, on the top left corner of the IDE, there is a tab with the device files. You can see which files are saved on the board. You can click on the files and see their content.
So, you can check whether you uploaded a file called main.py with the changes you refer.
If you’re new to all of this, I know this can be confusing at first. So, let me know if you need further help, or if you need me to explain it in a different way.
The problem was solved when I saved the revised program as main.py!!! What is the typical development cycle? It seems that I can create a new program, saved in another filename, but in order to run it in uPyCraft, I need to copy/paste that program into main.py? Is there another way of doing this so I can execute a program by its given name in uPyCraft?