Room climate sensor node (temperature, humidity) using ESP32 and SI7021 powered by a 18650 LiIon battery.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long. 1.9KB



Prepare toolchain (macOS):

cd ~/JBeyerstedt-Projekte/
mkdir ./esp32
cd esp32
curl -o xtensa-esp32-elf-osx-1.22.0-80-g6c4433a-5.2.0.tar.gz
tar -xzf xtensa-esp32-elf-osx-1.22.0-80-g6c4433a-5.2.0.tar.gz
rm xtensa-esp32-elf-osx-1.22.0-80-g6c4433a-5.2.0.tar.gz

Prepare toolchain (Debian, Ubuntu) (ubuntu devel vm):

sudo apt-get install git wget make libncurses-dev flex bison gperf python python-serial

cd ~/Development/
mkdir ./esp32
cd esp32
tar -xzf xtensa-esp32-elf-linux64-1.22.0-73-ge28a011-5.2.0.tar.gz
rm xtensa-esp32-elf-linux64-1.22.0-73-ge28a011-5.2.0.tar.gz

Add to your bash profile, zshrc or other:

export PATH=$PATH:$HOME/JBeyerstedt-Projekte/esp32/xtensa-esp32-elf/bin
export IDF_PATH = $HOME/JBeyerstedt-Projekte/esp32/esp-idf

or for ubuntu devel vm:

export PATH=$PATH:$HOME/Development/esp32/xtensa-esp32-elf/bin
export IDF_PATH = $HOME/Development/esp32/esp-idf

Install esp-idf:

git clone --recursive

Checkout this project and configure arduino-es32 with esp-idf:


mkdir -p components && \
cd components && \
git clone arduino && \
cd arduino && \
git submodule update --init --recursive && \
cd ../..

Configure make menuconfig:

  • under “Arduino Configuration”:
    • “Autostart Arduino setup and loop on boot”: off
    • “Disable mutex locks for HAL”: off
  • under “Serial flasher config”:
    • change flash size to 4 MB
    • optionally set your serial port
  • under “Component config” -> “ESP32-secific”:
    • set CPU frequency to 80 MHz

Make and flash:

make all
make flash

You would probably have to adapt the UPLOAD_PORT in the Makefile or set it via an environment variable.