Supported Targets | ESP32 | ESP32-C2 | ESP32-C3 | ESP32-C6 | ESP32-H2 | ESP32-P4 | ESP32-S2 | ESP32-S3 |
---|
Two tasks are created. One listens to button press and changes the system state. Other task changes LEDs behaviour based on system state.
comp-video.mov
Before building, be sure to follow the ESP-IDF Getting Started Guide to ensure you have the required development environment.
idf.py set-target TARGET
Where TARGET is one of the supported boards.
idf.py build
This builds all the mandatory files and builds this source code aka main.c (this might take a long time, depending on system resources).
Find the serial port of ESP32* board. (user might need to add $USER to uucp group):
sudo usermod -aG uucp $USER
Where PORT is e.g. /dev/ttyUSB0, if only one serial device is plugged then it is the USB0. Put board into boot mode (hold boot btn, press restart btn then release boot btn). Then initiate flashing sequence.
idf.py -p PORT flash
To open serial connection to the board.
idf.py -p PORT monitor