T-Echo Plus 快速开始
依赖库
| 库名 | 版本 | 来源 |
|---|---|---|
| RadioLib | 最新 | GitHub |
| Adafruit_EPD | 最新 | GitHub |
| TinyGPSPlus | 最新 | GitHub |
Arduino
PlatformIO(推荐)
- 安装 VS Code 和 PlatformIO IDE 扩展
- 克隆仓库:bash
git clone https://github.com/Xinyuan-LilyGO/LilyGO-T-Echo.git - 打开
platformio.ini,选择T-Echo-Plus环境 - 点击 ✓ 编译,连接 USB,点击 → 上传
Arduino IDE
开发板设置
| 设置项 | 值 |
|---|---|
| 开发板 | Adafruit Feather nRF52840 Express |
| Upload Speed | 115200 |
外设示例
墨水屏(Adafruit_EPD)
cpp
#include <Adafruit_EPD.h>
#include <SPI.h>
#define EPD_CS 33
#define EPD_DC 10
#define EPD_RESET 2
#define EPD_BUSY 3
Adafruit_IL0373 epd(212, 104, EPD_DC, EPD_RESET, EPD_CS, -1, EPD_BUSY);
void setup() {
epd.begin();
epd.clearBuffer();
epd.setCursor(10, 10);
epd.setTextColor(EPD_BLACK);
epd.setTextSize(2);
epd.print("T-Echo Plus");
epd.display();
}
void loop() {}LoRa(SX1262 — RadioLib)
cpp
#include <RadioLib.h>
#define LORA_CS 24
#define LORA_IRQ 25
#define LORA_RST 26
#define LORA_BUSY 17
SX1262 radio = new Module(LORA_CS, LORA_IRQ, LORA_RST, LORA_BUSY);
void setup() {
Serial.begin(115200);
int state = radio.begin(915.0, 125.0, 9, 7, RADIOLIB_SX126X_SYNC_WORD_PRIVATE, 22);
if (state != RADIOLIB_ERR_NONE) {
Serial.printf("LoRa 初始化失败: %d\n", state);
}
}
void loop() {
int state = radio.transmit("Hello T-Echo Plus");
Serial.printf("TX 状态: %d\n", state);
delay(2000);
}GPS(L76K — TinyGPSPlus)
cpp
#include <TinyGPSPlus.h>
TinyGPSPlus gps;
void setup() {
Serial.begin(115200);
Serial1.begin(9600); // GPS 使用 nRF52840 Serial1
}
void loop() {
while (Serial1.available()) gps.encode(Serial1.read());
if (gps.location.isUpdated()) {
Serial.printf("纬度: %.6f 经度: %.6f\n",
gps.location.lat(), gps.location.lng());
}
}常见问题
Q:一直无法烧录?
A:双击复位按钮进入 Bootloader 模式(LED 缓慢闪烁),然后再上传。
