Documentation-first repository for a Raspberry Pi Pico W / RP2040 project that drives a 4-digit 7-segment display using PIO-based multiplexing.
- RP2040 PIO-assisted 7-segment multiplexing
- 4-digit decimal counter display (incrementing)
- UART serial banner output on startup
- Wiring and architecture docs included
src/main.cpp— original firmware logic (preserved)include/segment.pio.h— placeholder contract for PIO-generated headerdocs/wiring.md— wiring map, components, GPIO usagedocs/architecture.md— code/module breakdown and data flowCMakeLists.txt— minimal documentation-oriented CMake scaffold
- Raspberry Pi Pico / Pico W (RP2040)
- 4-digit 7-segment display (A, B, C, D, E, F, G, DP, DIG1..DIG4)
- Jumper wires
- (Recommended for real hardware) current-limiting resistors
| Signal | GPIO |
|---|---|
| A..DP | GP2..GP9 |
| DIG1..DIG4 | GP10..GP13 |
| UART TX | GP0 |
| UART RX | GP1 |
- Create/import a Raspberry Pi Pico project in Wokwi using Arduino community core.
- Place
src/main.cpplogic as the sketch source. - Use the provided
diagram.jsonwiring (or mirrordocs/wiring.md). - Start simulation and open Serial Monitor.
- Expect startup message and incrementing 4-digit output.
- Open project with Arduino IDE / Arduino CLI using an RP2040 Arduino core.
- Ensure your PIO helper/header (
segment.pio.h) is present exactly as expected by the code. - Select board: Raspberry Pi Pico W.
- Build and flash.
- Connect display per
docs/wiring.mdand verify counting output.
- This firmware does not use Wi-Fi.
- If you add Wi-Fi later, keep credentials outside source control (e.g., local config header or build-time defines).
This repository intentionally preserves the provided main firmware behavior and focuses on structure + documentation.