Heltec IOT Lora Wireless Stick Upgrade esp32 lora/WiFi

I just purchased two Heltec IOT Lora Wireless Stick Upgrade esp32 lora/WiFi lora Development Board with 0.49inch OLED Display 868MHZ/915MHZ. I am only interested in local LoRa transmit/receive devices to monitor sensor data (BME280).

Using the Arduino IDE Heltec-Examples I can these two devices to communicate (one sender and one receiver). All is good so far. I prefer to use platformIo to develop code and I cannot get either the receiver or transimtter code to build without errors.

Here is my platformio.ini contents:

[env:heltec_wifi_lora_32_V2]
platform = espressif32
board = heltec_wifi_lora_32_V3
framework = arduino
monitor_speed = 115200
build_flags =
-DSERIAL_DEBUG=1

lib_deps = heltecautomation/ESP32_LoRaWAN@^2.1.1

The error is
fatal error: SPI.h: No such file or directory

Any help would be appreciated

Dear Jim.
if you read “fatal error: SPI.h: No such file or directory” , it means that you have missed calling that file, called “library” for this purpose. strange because examples are written in a way all librariies are properly loaded.
To load that library write at the very top of the sketch the following:
#include <SPI.h>

That #include sentence if for loading libraries. If it is already written down, then you might have a problem with a file missing in your system.
On the other hand, when using examples made by Heltec, they have implemented a library named heltec.h ( #include “heltec.h” ). Wich calls other libraries from that file.
Personally I sometimes decide not to call that library and use other libraries from internet. That is up to you.

Yo better have c++ programming knowledge in order to sort many problems that will arise when writing sketches for your test purposes.

Hello, you can try this library for Platformio: https://github.com/eiannone/Heltec_Esp32_LoRaWan

1 Like