Run "main.py" directly without "boot.py" #12719
Replies: 2 comments 4 replies
-
The normal habit of MP is to run boot.py, if it exists, and then main.py, if it exists. So if your boot.py renames itself and then terminates, main.py will be executed. |
Beta Was this translation helpful? Give feedback.
-
Here's my solution of this main.py problem.
If you have two GPIO pins you're not using then connect to the two pins when you want main.py to run. Disconnect when you don't. |
Beta Was this translation helpful? Give feedback.
-
Hello everyone.
I have an application than run once "boot.py" code to save some parameters to NVM (non-volatile memory) as a "factory defaults".
Then the same "boot.py" renames itself to "no_boot.py" and then the execution flow tries to execute "main.py" but doesn't work.
However, If I click the "boot switch button" on my ESP32 Devkit v.1, then the "main.py" continues to executing the program correctly.
Are there some way to avoid this?
In other words, if we turn power on our device and "boot.py" doesn't exist, the microcontroller follows the main execution without stopping all program flow?
Thank you very much. Greetings
Beta Was this translation helpful? Give feedback.
All reactions