Arduino 2.3.3 Setup for Heltec Modules

Attempted a fresh start of a new Mac running Sequoia 15.0.1. Ardunio IDE 2.3.3 installed. Followed Heltec ESP32 Series Quick Start step by step using the Git option. Only exception was using Python3 to execute get.py. No errors at any step. Restart of IDE after every step.

Tried to compile several of the examples. Received multiple errors. The errors involved missing environment variable. This included the code at the end of the Quick Start shown below:


#include <heltec.h>

// the setup routine runs once when starts up
void setup(){

// Initialize the Heltec ESP32 object
Heltec.begin(true /DisplayEnable Enable/, true /LoRa Disable/, true /Serial Enable/, true /PABOOST Enable/, 470E6 /**/);
}

// the loop routine runs over and over again forever
void loop() {

}


Compile produced the following errors:

Library Heltec ESP32 Dev-Boards has been declared precompiled:
Using precompiled library in /Users/jim/Documents/Arduino/libraries/Heltec_ESP32_Dev-Boards/src/esp32
/Users/jim/Documents/Arduino/libraries/Heltec_ESP32_Dev-Boards/src/driver/gpio-board.c: In function ‘GpioMcuWrite’:
/Users/jim/Documents/Arduino/libraries/Heltec_ESP32_Dev-Boards/src/driver/gpio-board.c:56:22: error: ‘RADIO_NSS’ undeclared (first use in this function)
56 | if(obj->pin==RADIO_NSS && radio_nss_inited==false)
| ^~~~~~~~~
/Users/jim/Documents/Arduino/libraries/Heltec_ESP32_Dev-Boards/src/driver/gpio-board.c:56:22: note: each undeclared identifier is reported only once for each function it appears in
/Users/jim/Documents/Arduino/libraries/Heltec_ESP32_Dev-Boards/src/LoRaWan_APP.cpp:40:34: error: ‘LoRaWAN_DEBUG_LEVEL’ was not declared in this scope; did you mean ‘CORE_DEBUG_LEVEL’?
40 | RTC_DATA_ATTR uint8_t debugLevel=LoRaWAN_DEBUG_LEVEL;
| ^~~~~~~~~~~~~~~~~~~
| CORE_DEBUG_LEVEL
/Users/jim/Documents/Arduino/libraries/Heltec_ESP32_Dev-Boards/src/LoRaWan_APP.cpp: In member function ‘void LoRaWanClass::sleep(DeviceClass_t)’:
/Users/jim/Documents/Arduino/libraries/Heltec_ESP32_Dev-Boards/src/LoRaWan_APP.cpp:666:40: error: ‘HELTEC_BOARD’ was not declared in this scope
666 | Mcu.sleep(classMode,debugLevel,HELTEC_BOARD,SLOW_CLK_TPYE);
| ^~~~~~~~~~~~
/Users/jim/Documents/Arduino/libraries/Heltec_ESP32_Dev-Boards/src/LoRaWan_APP.cpp:666:53: error: ‘SLOW_CLK_TPYE’ was not declared in this scope
666 | Mcu.sleep(classMode,debugLevel,HELTEC_BOARD,SLOW_CLK_TPYE);
| ^~~~~~~~~~~~~

exit status 1

Compilation error: exit status 1


What am I missing?

It’s a bit difficult to say without your telling us what board you’re using and what board you’ve selected in the IDE, but any sketch that includes “#include <heltec.h>” is unlikely to work—that library has effectively been obsolete for some time now so any sketch that includes it is also likely to be ‘out of date’ and certainly won’t work with any of the V3 boards.

If the sketches you are finding in the Examples, assuming that you are using the [Heltec] examples provided through the IDE, include this library, you’ve probably either picked up an old version of the Heltec support software from GitHub, or you’ve selected the wrong board [in the IDE].

I suspected a library issue. I just followed the instructions in the Quick Start Guide. I was trying the HiLetgo ESP32 OLED WiFi Kit V3 with the board the board set to the same name. I tried different examples with the same type of errors.

Where can I find the correct board and library files? Thanks for your help.

If that’s just the Heltec WiFi Kit V3 board, it doesn’t have a LoRa node IC, so it’s probably no surprise that attempting to run a sketch that uses LoRa won’t compile…

Try selecting “WiFi Kit 32(V3)”. If you can’t see that board option in the IDE, you’ll probably need to check what software you actually loaded from GitHub. With the correct support software loaded, and that board selected, the next thing to do would be to try the example sketch at File>Examples>Heltec Example>FactoryTest>WiFi_Kit_32_V3_FactoryTest. Again, if you can’t see that example sketch, you don’t have the correct support software loaded.

If you’re still having problems, try loading the “Heltec ESP32 Dev-Boards” software through the IDE Library Manager. You may still end up with conflicting software issues, or confusion at best, if this results in the installation of two different versions of support software. The IDE will choose one version, but it may not be the correct one… If that sort of thing happens, you may be best to just delete your current installation and start again—IDE, then use the Library Manager to load the Heltec software. That may not get you the very latest bug fixes, but I’m still running software that’s several releases behind without any problem and the examples should be fine regardless.