-
1Make Connections
Follow the Pinouts table to make connections:
![]()
-
2Directory Structure
/dos_directory |---- CMakeLists.txt |---- /main |----- CMakeLists.txt |----- main.cpp -
3Write source code (main.cpp)
I would recommend writing your own code like I did. Here are some snippets from my code:
![]()
![]()
![]()
![]()
-
4Build (For Building Purposes I am using ESP-IDF environment on Linux)
For a Linux setup -
1) Navigate to project directory
cd dos_directory2) Set ESP-IDF Environment (if not done already)
. $HOME/esp/esp-idf/export.sh
3) Set Target
idf.py buildThis will compile the code and create binary files.
-
5Flash to ESP32
1) Connect ESP32 via USB.
2) Flash:
idf.py -p /dev/ttyUSB0 flash
3) Replace /dev/ttyUSB0 with your port:
- Linux: /dev/ttyUSB0 or /dev/ttyACM0
- macOS: /dev/cu.usbserial-XXXX
- Windows: COM3 (or whatever shows in Device Manager)
OR
Auto-detect port:
idf.py flash(ESP-IDF will try to auto-detect)
4) To see Log Output:
idf.py -p /dev/ttyUSB0 monitor
-
6Full Build & Flash (all in one)
$ idf.py build flash monitor # Just build: $ idf.py build # Just flash: $ idf.py flash # Just monitor: $ idf.py monitor # Clean build: $ idf.py fullclean $ idf.py build # Erase flash completely: $ idf.py erase-flash -
7Ready to Jam
It will start automatically every time you power on the ESP32.
divyanshu__




Discussions
Become a Hackaday.io Member
Create an account to leave a comment. Already have an account? Log In.