-
Supported chips:
esp32
,esp8266
,esp32s2
-
Images Micropython source:
-
Steps:
- install
esptool
for flashing:pip install esptool
- find port (macOS):
l /dev/cu.*
- execute (e.g. port:
/dev/cu.usbmodem01
, image:firmware/ESP32_GENERIC-20240105-v1.22.1.bin
, chip: see supported chips)source scripts/<chip>_firmware_flash.sh <port> <image>
- install
- create
common/secrets.py
file and add Wi-Fi connection details, variables:SSID
,PASSWORD
(.gitignore
ignores file) - plug device to PC with cable that supports data transfer (
USB C
,micro USB
)
- download Thonny app on computer
- right corner or the app, select port for that device (e.g.
ESP32 /dev/cu.usbserial-0001
on Mac/Linux,COM*
on Windows) - if that didn't connect the device (green play button should appear if it's connected/detected):
- try clicking on the red stop button in the Thonny
- try selecting another device for that same chip (e.g. ESP32 or ESP8266)
- sometimes it takes few seconds for computer to detect device (restart from
step 1
)
- developing your own app
- use
main.py
file as entry point for device - use libraries from
src/common
folder to extend your logic - use
src/examples
for examples and quickstart
- use
- right click on
src
folder in Thonny file explorer >Upload to /
to uploadsrc
to device - create
main.py
file in the device file explorer as a device starting point when connected with the power cable - from this point, two options are available:
- restart device with
RST
button on it (runsmain.py
file on the device) - you won't be able to see logs/prints - click green
play
button in Thonny (it runs opened file in Thonny) - you'll be able to see logs/prints
- restart device with
- (optional) change
src/common
libraries if needed to fit your design