Files
temperature/README.md
DESKTOP-PUHFO60\dsx2016 eb21ec95eb Add CYD LVGL climate dashboard with DHT11 on GPIO22.
Include always-on UI, README, and a rule to commit and update docs after each change.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-10-17 14:49:17 +08:00

69 lines
1.8 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# CYD 温湿度仪表盘
ESP32 Cheap Yellow Display(ESP32-2432S028R)+ DHT11 + LVGL 温湿度仪表盘。
## 硬件
| 项目 | 说明 |
|------|------|
| 板子 | CYD ESP32-2432S028R(2.8" ILI9341) |
| 传感器 | DHT11 |
| DATA | **GPIO22**(CN1 / P3) |
| 供电 | USB 5V;电池需外接充电管理(板载 JST 多为供电口) |
接线:`VCC→3.3V`,`GND→GND`,`DATA→GPIO22`。
## 功能
- 横屏温湿度圆弧仪表 + 数字读数
- EMA 平滑、min/max、舒适度、体感温度 / 露点
- 温湿度趋势折线
- 点按屏幕切换背光亮度(4 档)
- 偶发 DHT 读失败容错(连续失败才报错)
- 常亮运行(无自动熄屏 / 休眠)
## 构建与烧录
依赖 [PlatformIO](https://platformio.org/)。
```bash
pio run -e cyd_28r -t upload
pio device monitor -b 115200
```
### 环境选择
| 环境 | 适用 |
|------|------|
| `cyd_28r` | 标准 ILI9341 CYD(默认) |
| `cyd_28r_inv` | 颜色反相 / 发白 |
| `cyd_28_st7789` | USB-C 双口 / ST7789 变体 |
## 项目结构
```
platformio.ini # 板级与库依赖
include/lv_conf.h # LVGL 配置
src/main.cpp # 仪表盘主程序
scripts/exclude_lvgl_asm.py # 排除 ESP32 不兼容的 LVGL ASM
.cursor/rules/ # Cursor 协作规则
README.md # 本文档
```
## 变更约定
每次功能或行为改动须:
1. 更新本 README(及必要时的注释)
2. `git add` + `git commit` 提交
详见 `.cursor/rules/git-and-docs.mdc`。
## 变更记录
| 日期 | 说明 |
|------|------|
| 2026-10-17 | 初版:LVGL 仪表盘 + DHT11(GPIO22),平滑/舒适度/趋势/背光 |
| 2026-10-17 | 曾加入 ECO 熄屏休眠,后改回常亮正常版 |
| 2026-10-17 | 初始化 Git,补充 README 与提交约定 |