Files
smdky009ledtest/README.md
DESKTOP-PUHFO60\dsx2016 53c57f1cfd Add KY-009 RGB LED test with SoftSPI touch and LVGL.
R/G/B color switch (GPIO22/27/4), PWM brightness, and flashable firmware/cyd package.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-10-23 11:17:31 +08:00

44 lines
854 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.
# KY-009 SMD LED(CYD)
触控 + LVGL 参考 `hw269test` / `tftest`。一次只亮一路颜色,可切换 R/G/B + 调亮度。
## 硬件
| 项目 | 说明 |
|------|------|
| 板子 | CYD ESP32-2432S028R |
| 模块 | KY-009 SMD RGB LED |
| R | **GPIO22** |
| G | **GPIO27** |
| B | **GPIO4**(未接则蓝灯无输出) |
接线:`R→GPIO22`,`G→GPIO27`,`B→GPIO4`,`GND→GND`(共阴);若共阳需改 duty 极性。
## 操作
- **R / G / B** 按钮:切换当前颜色(其它路关断)
- 滑条:当前颜色亮度 0–100%
- 底部按钮:总开关
## 构建 / 上传
```bash
pio run -e cyd -t upload
```
## 预编译固件
随时可刷(无需编译):
```powershell
cd firmware\cyd
.\flash.ps1
# 或 .\flash.ps1 -Port COM3
```
重新从构建导出:
```powershell
.\firmware\export_from_build.ps1
```