Heltec ESP32 Series Quick Start

This article describes the installation of the Heltec ESP32 series development framework and library.

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.


Preparation

  1. USB driver, you can refer to this article to establish a serial connection.
  2. Install Git and Arduino IDE.

Installing development framework

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

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.

Example

This section is 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 it.

Execute an example

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

Then select an example.

Tip

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

Leave a Comment