English | 中文
- Install
Visual Studio Code
andPython
- Search for the
PlatformIO.IDE
plugin in theVisual Studio Code
extension and install it, after the installation is complete, you need to restartVisual Studio Code
- After restarting
Visual Studio Code
, select theFile
->Open Folder
->LILYGO-LORA-EPAPER-SERIES
directory in the upper left corner ofVisual Studio Code
- Open the
platformio.ini
file and click in the platformio column to uncomment one line,default_envs
= xxxx, to ensure that only one line is valid - Click the (✔) symbol in the bottom left corner to compile
- Connect the circuit board to the USB port of the computer
- Click (→) to upload firmware
- Click (plug symbol) to monitor serial port output
- Install the current upstream Arduino IDE at the 1.8 level or later. The current version is at the Arduino website. (NOTE: MacOS may require that you install separate drivers to interact with your board. You will get error messages that occur when the IDE attempts to upload code. You should consider running the Arduino IDE in a Virtual Machine on Linux. Installing other drivers on your Mac is out of scope for this document.)
- Start Arduino and open Preferences window. In additional board manager add url:
https://raw.githubusercontent.com/espressif/arduino-esp32/gh-pages/package_esp32_index.json
If you have multiple URLs (e.g., for other boards), just add previously mentioned URL, separated by a comma. - Copy all folders in the
lib
directory to your Arduino Libraries Directory,
- in MacOS, it is
~/Documents/Arduino/libraries
- in Linux, it is
~/Arduino/libraries
- in Windows, it is
Documents/Arduino/libraries
- Open the corresponding example
- In the Arduino Application, navigate to the Board Manager menu ("Tools => Board => Board Manager"), search for
esp32
, and make sure that you install the latest version. After you do this, you can select the board you have from the list of boards in the "ESP32 Arduino" menu ("Tools=> Board => ESP32 Arduino"). It`s very important to note that the list of boards is NOT in alphabetical order. Look for the board you are working with carefully in the list. Lilygo-LoRa-Epaper-series
users can chooseESP32S3 Dev Module
- Select the port of the board in the port
- Please uncomment the
utility.h
file above each sketch based on your board model, otherwise compilation will report an error - Upload
├─ ArduinoLoRa # Only support SX1276/SX1278 radio module
│ ├─LoRaReceiver
│ └─LoRaSender
├── Display
│ ├── GxEPD_U8G2_Fonts_Demo
│ └── GxEPD_picture_examples
├─ RadioLibExamples # RadioLib examples,Support SX1276/78/62/80
│ ├─SX1262
│ │ ├─SX1262_Receive_Interrupt
│ │ └─SX1262_Transmit_Interrupt
│ ├─SX1268
│ │ ├─SX1268_Receive_Interrupt
│ │ └─SX1268_Transmit_Interrupt
│ ├─SX1276
│ │ ├─SX1276_Receive_Interrupt
│ │ └─SX1276_Transmit_Interrupt
│ ├─SX1278
│ │ ├─SX1278_Receive
│ │ ├─SX1278_Receive_Interrupt
│ │ ├─SX1278_Transmit
│ │ └─SX1278_Transmit_Interrupt
│ ├─SX1280
│ │ ├─SX128x_Receive_Interrupt
│ │ └─SX128x_Transmit_Interrupt
├──SD
│ ├── SD_Test
│ └── SD_Epaper_Test
└─SleepTest
- View 'utilities.h' in each example folder
- After setting the LoRa output power, set the lowest current. Set sx1262 as follows :
// digitalWrite(LoRa_Busy, LOW);
// set output power to 10 dBm (accepted range is -17 - 22 dBm)
if (radio.setOutputPower(22) == RADIOLIB_ERR_INVALID_OUTPUT_POWER) {
Serial.println(F("Selected output power is invalid for this module!"));
while (true);
}
// set over current protection limit to 80 mA (accepted range is 45 - 240 mA)
// NOTE: set value to 0 to disable overcurrent protection
if (radio.setCurrentLimit(80) == RADIOLIB_ERR_INVALID_CURRENT_LIMIT) {
Serial.println(F("Selected current limit is invalid for this module!"));
while (true);
}
- Ink screen takeout:
Note: The size of the display picture should be consistent with the width and height of the ink screen otherwise it may not achieve the display effect
The following is a reference image:
Use the mold taking software image2lcd
Select Output data type
asC Language Array
Select Scan Mode
asVertical Scan
Select Output Grayscale to Monochrome
Select maximum width and height
according to the size of the ink screen
After opening the file, you need to delete the first six bits in the array and add a reference to it