5-way navigation button module con ESP32
Alimentazione 3.3 V
Bus GPIO
Pin e collegamento all’ESP32
| Pin | Ruolo | Pin ESP32 | Note |
|---|---|---|---|
| COM | Massa | GND | Common: to GND. Keys read LOW with INPUT_PULLUP |
| UP | Uscita (la pilota il componente) | D25 | Up |
| DWN | Uscita (la pilota il componente) | D26 | Down |
| LFT | Uscita (la pilota il componente) | D27 | Left |
| RHT | Uscita (la pilota il componente) | D32 | Right |
| MID | Uscita (la pilota il componente) | D33 | Centre press |
| SET | Uscita (la pilota il componente) | D23 | Extra SET button |
| RST | Uscita (la pilota il componente) | D19 | Extra RST button (not the ESP32 reset) |
Collegamento consigliato per l’ESP32 DevKit a 30 pin, evitando i pin della flash, di sola lettura e di strapping. BoardPilot lo controlla mentre colleghi.
Codice di partenza (Arduino)
void setup() {
Serial.begin(115200);
pinMode(25, INPUT); // UP
}
void loop() {
Serial.println(digitalRead(25));
delay(100);
}
Fonti
- ALPS Alpine SKRH multi-directional switch datasheet, Common terminal and five direction contacts
- Common 5-way navigation module, Header COM, UP, DWN, LFT, RHT, MID, SET, RST. Check the silkscreen
Provalo in 3D in BoardPilot
Componenti simili
1x4 membrane keypad (4 keys)433 MHz receiver (XY-MK-5V)4x3 membrane keypad (12 keys)4x4 membrane keypad74HC165 input shift registerArcade button 30 mm with LED
Dati dei componenti: CC BY 4.0, riutilizzabili citando BoardPilot.