Heltec ESP32+LoRa Series Quick Start

[English]

LoRaWAN related code has been stripped since version 3.0.0. Heltec ESP32 framework only contains the basic code now, For the special ESP32 codes please download Heltec ESP32 Series Library.

Framework v3.0.0 and Library v2.0.0 are updated together, Older frameworks and libraries are no longer applicable to the new ones.

Preparation

  1. USB driver, you can refer to this articles establish serial connection.

  2. Install Git and Arduino IDE.

Installing development framework and

There are three methods to install the development framework, choose one of they:

Via Arduino Board Manager

  1. Open Arduino IDE, and click File->Peferences.

  1. Input the last ESP32 package URL: https://resource.heltec.cn/download/package_heltec_esp32_index.json

  1. Click on the Boards Manager icon on the left side of the Arduino, and enter “heltec esp32” in the search box that pops up., then select the latest version and click install .

  1. For special code library, search for “HELTEC ESP32” in Library Manager, select the latest version and install:ESP32 Series Library.

Via Git

  1. Installing Git.

  2. Check the following links for your operating system, the specific operation steps are detailed in the link:

小技巧

After obtaining updates through “git pull”, please execute “get. exe” under the path of “Arduino\hardware\heltec\esp32\tools” to obtain the latest compilation tool.

  1. The above is the development environment installation. If you need to install the Heltec ESP32 extension library, you can refer to this link:Heltec ESP32 Series Library

Via Local File

  1. Download the development environment. https://resource.heltec.cn/download/tools/esp32.zip

  2. Open Arduino IDE, and click File->Peferences.

  1. Go to the folder in the red box.

  1. Create a new “hardware” folder in the Arduino folder. If there is already a “hardware” folder, you don’t need to create a new one.

  1. Creat a new “hletec” folder in “hardware” folder.

  1. Go to the “heltec” folder and extract “esp32” into this folder.

  1. Go to the “heltec” folder, refer to the figure below to confirm whether the path in the red box is correct.

  1. Restart the Arduino IDE to confirm whether the development environment is installed successfully.

  1. For the Heltec ESP32 specific code, just download the zip file and unzip it to the following path: Username/Documents/Arduino/Libraries.

Example

This section for verifying whether you can program with Arduino or not. Now, The USB cable connects to Heltec ESP32 board, then select your serial port which is connected to Heltec ESP32 board.

Select a demo example, compile and upload.

Execute an example

Correctly select a board and relevant options in the Tools menu:

Then select an example.

小技巧

To execute the code in a library, you need to mouse over, scroll down, find the library, and find the code in it.

Compile & Upload

New a Heltec ESP32 program

Open Arduino IDE, create a new .ino file, then copy the below code.

#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 it and upload, the screen (if this board has a screen) will show and Arduino’s serial monitor will print something, it means Heltec ESP32 board is running successfully!