Files
btntest/README.md
DESKTOP-PUHFO60\dsx2016 7459f9bde1 Support 3-pin button module (VCC/GND/OUT) with auto polarity.
Sample idle level at boot; OUT on GPIO22, no internal pull fight.

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

35 lines
714 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)
GPIO22 读三脚轻触按键模块:每按一次,屏幕计数 +1。
## 硬件
| 项目 | 说明 |
|------|------|
| 板子 | CYD ESP32-2432S028R |
| 模块 | 三脚轻触按键(VCC / GND / OUT) |
| 输出 | **GPIO22** |
### 接线
| 模块 | CYD |
|------|-----|
| VCC / 3.3V | **3.3V** |
| GND | **GND** |
| OUT / S / DO | **GPIO22** |
开机自动采空闲电平,反相视为按下(兼容「按下变高」或「按下变低」)。
屏上 `OUT HIGH/LOW` 与 `act=`:按下时 OUT 应变到 `act` 那一侧并 +1。
## 操作
- 按一下:计数 +1(上电时请勿按住)
- 触控 **Reset**:清零
## 构建
```bash
pio run -e cyd -t upload
```