PWM on GPIO22 for on/off and brightness; UI layout keeps slider and power button separate. Co-authored-by: Cursor <cursoragent@cursor.com>
25 lines
421 B
Markdown
25 lines
421 B
Markdown
# HW-269 白光灯(CYD)
|
||
|
||
触控 + LVGL 参考 `tftest`。GPIO22 PWM 控制 HW-269:开关 + 亮度。
|
||
|
||
## 硬件
|
||
|
||
| 项目 | 说明 |
|
||
|------|------|
|
||
| 板子 | CYD ESP32-2432S028R |
|
||
| 模块 | HW-269 3W 白光 LED |
|
||
| 信号 | **GPIO22**(S) |
|
||
|
||
接线:`VCC→5V`,`GND→GND`,`S→GPIO22`。
|
||
|
||
## 操作
|
||
|
||
- 底部按钮:开关灯
|
||
- 滑条:亮度 0–100%
|
||
|
||
## 构建
|
||
|
||
```bash
|
||
pio run -e cyd -t upload
|
||
```
|