Heltec ESP32 Series Quick Start

[English]

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.

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:

通过Arduino Board Manager

  1. 打开Arduino IDE,然后依次点击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.


通过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


通过本地文件

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

  2. 打开Arduino IDE,然后依次点击click File->Peferences.

  1. 进入红色框文件夹

  1. 在Arduino文件夹中创建一个新的”hardware”文件夹.如果已经有一个”hardware”文件夹,你不需要创建一个新的.

  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. 重新启动Arduino IDE,确认开发环境是否安装成功.

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


示例

本节用于验证是否可以使用Arduino进行编程。现在,USB线连接到Heltec ESP32板,然后选择您连接到Heltec ESP32板的串口.

选择一个演示示例,编译并上传.

选择一个例程

Tools菜单中正确选择开发板和相关选项:

然后选择一个例子.

小技巧

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

编译&上传


新建一个Heltec ESP32 程序

打开Arduino IDE,创建一个新的 .ino文件,然后复制下面的代码.

#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() {

}

编译并上传,将在屏幕上(如果该板有屏幕)显示一些信息,并在串行端口打印一些东西,这意味着Heltec ESP32板运行成功!