MicroPython Programs
In MicroPython, both boot.py and main.py are special files that run automatically when the microcontroller starts up. The primary difference lies in their execution order and intended purpose.
boot.py runs first immediately after power-up or reset. followed immediately by main.py.
The former contains low-level configuration (such as setting up Wi-Fi, mounting SD cards, or configuring USB). This will be readily available for your microcontroller and you do not need to make any changes to it unless you are an advanced/expert programmer wanting to do some low-level management.
The latter contains the main application logic (such as reading sensors, controlling LEDs, or running a web server) which is where you will be writing all your code.