Projects that program the ESP32 micro-controller
| domestic-climate-monitor | ||
| README.md | ||
Pre-requisites
ESP-IDF SDK
The ESP-IDF is the SDK, provided by Expressif, for programming the ESP32 with C and C++.
Install (on Arch):
yay -Sy esp-idf
User permissions
Ensure you are a member of the uucp group, to enable access to serial ports:
usermod -a -G uucp $USER
Check ESP32 serial connection
List USB devices
lsusb
You should see the ESP32 listed and named something like Silicon Labs CP210x -
this is the USB-to-serial chip on the ESP32 board.
Can also run:
ls /dev/ttyUSB*
Which should reveal:
crw-rw---- 1 root uucp 188, 0 Dec 15 17:57 /dev/ttyUSB0
Initialise ESP-IDF local environment in terminal
cd into sub-project and run
. /opt/esp-idf/export.sh
This gives you access to the ESP-IDF Python CLI.
Then initialise the project:
idf.py set-target esp32
Compile program
idf.py build
Flash to device
idf.py flash
Monitor program execution
idf.py -p /dev/ttyUSB0 monitor
Clean the build cache
idf.py fullclean