BOOT

Boot Process:
 1. Initializing peripherals
 2. Running preboot.txt
 3. Initializing WiFi
 4. Running boot.txt
The process can be monitored in the serial console.

boot.txt

The boot.txt file should be uploaded to storage or created in the terminal. It contains commands that the module executes line by line at the end of the boot process. A maximum of 50 lines is allowed. Lines starting with // are not executed. Multiple commands can be placed on one line using the | separator. Files with the ".boot" extension are renamed to boot.txt upon upload. It is recommended to include blue and green commands from the command help here, and set the default state of the used GPIO pins.

Example: Pressing a button activates a relay for three seconds.
TIMER[0]CS:GPIO[D1]H
TIMER[0]CE:GPIO[D1]L
GPIO[D5]INP
GPIO[D5]CL:TIMER[0](3s)

preboot.txt

This is very similar to boot.txt. Commands written here are executed before the WiFi network is initialized. The KILL command interrupts the boot process (WiFi does not start). The SLEEP command puts the module into standby mode (consumption: ~10µA), so the reset button can be used to run preboot.txt. Files with the ".preboot" extension are renamed to preboot.txt upon upload.

Example: ESP-NOW remote control.
NOW[0]@message
SLEEP