Files
smdky009ledtest/README.md
DESKTOP-PUHFO60\dsx2016 5c40b7e633 Document CYD project conventions for the next test repo.
Point README/AGENTS at the shared CYD_PROJECT_GUIDE (LVGL, flashable firmware, local git).

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

46 lines
1.0 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.
# KY-009 SMD LED(CYD)
触控 + LVGL 参考 `hw269test` / `tftest`。一次只亮一路颜色,可切换 R/G/B + 调亮度。
> **新开 CYD 测试工程请先读:** [`../CYD_PROJECT_GUIDE.md`](../CYD_PROJECT_GUIDE.md)(LVGL/触控、可刷固件、本地 git、目录结构)。本仓另见 [`AGENTS.md`](AGENTS.md)。
## 硬件
| 项目 | 说明 |
|------|------|
| 板子 | 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
```