- Open this folder in Visual Studio Code.
- Create a file
env.h
and initialize it with the environment-specific information using this template:
#define OTA_UPDATE_OPTIONAL
// #define WOKWI_COMPAT
#ifdef WOKWI_COMPAT
#define WIFI_SSID "Wokwi-GUEST"
#define WIFI_PASSWORD ""
#else
#define WIFI_SSID ""
#define WIFI_PASSWORD ""
#endif
- Open the extensions tab on the left (4 squares).
- Install the ESP-IDF and Serial Monitor extensions.
- Choose "EXPRESS" installation after it finishes installing.
- Set "Select ESP-IDF version" to "v5.3 (release version)" and click "Install".
- Plug the target S2 Mini into your computer.
- Press the RST button on the S2 Mini while holding the 0 button. This puts the ESP32 into bootloader mode and allows it to be flashed manually.
- Run the command "ESP-IDF: Select port to use" and
- Run the command "ESP-IDF: Build, Flash, and start a monitor on your device"
- You should see an error about the flash failing. To verify it worked, enter the Terminal tab and it should say the flash reached 100%. If it didn't, you likely picked the wrong serial port or didn't enter the bootloader.
- Press the RST button on the S2 Mini to reboot into your new firmware.
- Open the "SERIAL MONITOR" tab in the terminal modal in the bottom right.
- Select the serial port for the S2 Mini and "Start Monitoring".