This article describes installing 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.
PreparationYou can refer to this article to establish a serial connection for a USB driver.
Installing development frameworkThere are three methods to install the development framework, choose one of them:
Via Arduino Board Manager- Open Arduino IDE, and click
File
->Peferences
.
- Input the last ESP32 package URL:https://resource.heltec.cn/download/package_heltec_esp32_index.json
- 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 clickinstall
.
- For special code library, search for “HELTEC ESP32” in
Library Manager, select the latest version, and install
ESP32 Series Library.
This section is for verifying whether you can program with Arduino or not. Now, The USB cable connects to the Heltec ESP32 board, then select your serial port connected to the Heltec ESP32 board.
Select a demo example, compile it, and upload it.
Execute an exampleCorrectly 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
Open Arduino IDE, create a new .ino
file, andthen 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, which means the Heltec ESP32 board is running successfully!
Comments