A Raspberry Pi Pico W project that reads a 4x4 membrane keypad and drives 12 discrete LEDs.
The firmware logic maps keypad keys to LED outputs:
- Numeric keys (
1-8) switch on individual blue LEDs. 9turns on all blue LEDs,0turns them off.- Letter keys (
A-D) switch on individual red LEDs. *turns on all red LEDs,#turns them off.
Important: The source logic is preserved exactly from the provided code. This repository focuses on structure and documentation.
.
├── CMakeLists.txt
├── src/
│ └── main.cpp
├── include/
├── docs/
│ ├── architecture.md
│ └── wiring.md
└── wokwi/
└── diagram.json
- 4x4 keypad matrix input (rows + columns).
- 12 independent LED channels.
- Group control shortcuts for blue and red LED banks.
- Wiring compatible with Wokwi Pico simulation and real Pico W hardware.
Derived from wokwi/diagram.json:
- 1x Raspberry Pi Pico/Pico W (
wokwi-pi-pico) - 1x 4x4 membrane keypad (
wokwi-membrane-keypad) - 12x LEDs (
8 blue + 4 red) - 12x 220Ω resistors (LED current limiting)
- 4x 1kΩ resistors (keypad row pull-ups)
- Jumper wires
The provided firmware uses Arduino-style APIs (setup, loop, Keypad.h, digitalWrite, etc.).
- Open wokwi.com.
- Create/import a Raspberry Pi Pico W project.
- Copy
src/main.cppinto the sketch source. - Replace the project
diagram.jsonwithwokwi/diagram.json. - Ensure
Keypadlibrary is enabled in Wokwi libraries. - Start simulation and press keypad buttons.
You can run this via an Arduino-core workflow targeting Pico W (because code is Arduino-style):
- Install Arduino IDE or PlatformIO.
- Install Raspberry Pi Pico/RP2040 board package.
- Install Keypad library.
- Select board: Raspberry Pi Pico W.
- Wire hardware exactly as documented in
docs/wiring.md. - Upload firmware and validate behavior.
A CMakeLists.txt scaffold is included for repository consistency with C/C++ projects. The current source is not native Pico SDK style and would require API porting to compile directly with Pico SDK (intentionally not done to avoid logic rewrites).
- This project does not use Wi-Fi in its current firmware.
- No credentials are required.
- If Wi-Fi is added later, keep credentials in a local config file excluded by
.gitignore.
Note:
wokwi/diagram.jsonis a compact checked-in scaffold; use the full provided diagram content when recreating the exact visual layout.