Files
btntest/README.md
DESKTOP-PUHFO60\dsx2016 22a3c469d4 Add button counter test on GPIO22 with SoftSPI touch and LVGL.
Each press increments on-screen count; touch Reset clears. Flashable firmware/cyd package.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-10-23 12:43:09 +08:00

36 lines
706 B
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)
触控 + LVGL 参考 `hw269test` / `tftest`。GPIO22 读按钮:每按一次,屏幕计数 +1。
## 硬件
| 项目 | 说明 |
|------|------|
| 板子 | CYD ESP32-2432S028R |
| 模块 | 轻触按钮 / 按键传感器(SIG 输出) |
| 信号 | **GPIO22**(内部上拉,按下为 LOW) |
接线:`VCC→3.3V`,`GND→GND`,`SIG→GPIO22`。
## 操作
- 按一下物理按钮:计数 +1
- 屏幕显示当前计数与 PRESSED / IDLE
- 触控 **Reset**:计数清零
## 构建
```bash
pio run -e cyd -t upload
```
预编译包:
```powershell
cd firmware\cyd
.\flash.ps1
# 或 .\flash.ps1 -Port COMx
```
更新预编译包:`.\firmware\export_from_build.ps1`