Setting up Arduino IDE with Heltec ESP32 module for macOS

Heltec WiFi Kit 32 ESP32 module

The Heltec WIFI Kit 32 is an interesting little module that integrates a WiFi/MCU SoC and a small OLED display on a single board. If you want to set up the Arduino IDE to work with this device and you’re on macOS, this is for you. This particular ESP32 module has a number of impressive features: 240 MHz processor speed and 4 MB of flash memory. The onboard OLED display can be conveniently used for debugging.

Install command line development tools

If you haven’t already installed the command line dev tools, you’ll need to do so.

1
xcode-select --install

For some reason, I had to do this twice before it would install. It eventually succeeded.

Install the Arduino support files

1
2
3
4
5
6
7
mkdir -p ~/Documents/Arduino/hardware/espressif
cd ~/Documents/Arduino/hardware/espressif
git clone https://github.com/espressif/arduino-esp32.git esp32
cd esp32
git submodule update --init --recursive
cd tools
python get.py

With the last command python get.py I got an SSL error. I was able to workaround it but downloading the mkspiffs archive here. My target machine is still on 10.11, and I downloaded mkspiffs-0.2.1-osx.tar.gz. Then I just moved the archive (not unzipped) to ~/Arduino/hardware/espressif/esp32/tools/dist. Then I reran:

1
python get.py

It still threw an error related to openssl, so I updated the Python distribution with Homebrew[1], and updated openssl:

1
2
brew install openssl
brew install python

Then I was able to run get.py:

1
python3.6 get.py

Now you’re setup to use the Arduino IDE to develop for this powerful little board.

Heltec WiFi Kit 32 pin diagram

References


  1. Homebrew is an excellent package manager for macOS. It's incredibly easy to install. See the link provided.