NEXT firmware
Welcome
HealthyPi 5 is an open-source biosignals-acquisition platform built around the dual-core RP2040, an ESP32-C3 wireless co-processor, and three analog front-ends: MAX30001 (ECG and bio-impedance), AFE4400 (PPG / SpO₂), and an I²C body-temperature sensor. It works as a Raspberry Pi HAT, as a standalone wearable, or as a desktop biosignals platform.
Both the firmware and hardware design files are fully open source. All recorded data stays on your device or your computer — no cloud, no accounts.
Where to start
One firmware: NEXT
NEXT is the ground-up rebuild of the HealthyPi 5 firmware, and it replaces everything that came before it.
The old firmware offered four “operating modes” — Basic, BLE, Display, Logger — as separate images you flashed depending on what you wanted to do. That’s gone. There is now one production firmware, and what used to be a mode is now a sink you switch on in a single line of code:
#include <FreeRTOS.h>
#include <Protocentral_HealthyPi_5.h>
void setup() {
HealthyPi5.computeVitals(); // heart rate, SpO2, respiration
HealthyPi5.streamOpenView(); // OpenView 2 over USB
HealthyPi5.recordSD(); // record to the microSD card
HealthyPi5.enableBridge(); // BLE / Wi-Fi via the ESP32-C3
HealthyPi5.begin();
}
void loop() {} // all work runs in pinned core0 tasks
That sketch is the production firmware. It ships as examples/Applications/HealthyPi5_NEXT.
Underneath, NEXT is dual-core and lossless by design: one RP2040 core does nothing but acquire samples at 128 SPS into a lock-free ring; the other runs every consumer — DSP, USB streaming, SD, the wireless bridge — as an independently queued task. A slow SD card or an absent ESP32 drops its own samples and is counted for it. It can never stall acquisition. Guaranteed-lossless sampling is a property the architecture enforces, not one you tune for.
Used the board before? Why NEXT covers what changed, what you gain, and what you give up.
If your board is still running the old firmware, flash NEXT for the best results — guaranteed-lossless sampling, one image instead of four, and every feature switchable in a single line of code. No hardware change is required. NEXT runs on every HealthyPi 5 revision (5.2–5.7) as shipped; it is purely a firmware update, and you can flash it by drag-and-drop with no toolchain installed.
Ready-to-run firmware
A pre-compiled .uf2 image of the production firmware, ready to drag-and-drop — no toolchain required.
| Firmware | Board | Download |
|---|---|---|
| HealthyPi5 NEXT | All revisions, 5.2–5.7 | Download |
One image covers every kit. Unlike the older firmware there is no separate build per display panel, because the Arduino firmware doesn’t drive the on-board LCD in this release — see If you have the display add-on below.
It streams to OpenView 2 over USB, records to the microSD card, computes heart rate, SpO₂ and respiration on-device, and relays to the ESP32-C3 for BLE and Wi-Fi.
Or build it yourself
Arduino IDE
- Install the arduino-pico board core and the three ProtoCentral libraries.
- Select board “Raspberry Pi Pico”, then set Tools → os: “FreeRTOS SMP”.
- Open
examples/Applications/HealthyPi5_NEXTand click Upload.
Full walkthrough, with the exact library versions: Arduino Quick Start.
Command line (for CI, batch flashing, or a Debug Probe)
With arduino-cli installed, clone the firmware repo and run:
./extras/scripts/install-core.sh # one-time: board core + sensor libraries
./extras/scripts/upload.sh next # build + flash the production firmware
upload.sh targets the Raspberry Pi Debug Probe over SWD by default; add --serial to flash over USB instead, or --monitor to open the UART console afterwards.
Flash the firmware
The HealthyPi 5 ships with the RP2040’s UF2 bootloader, so flashing is drag-and-drop — the same six steps for the Complete Kit and the Basic Kit:
-
Connect the device to your computer with a USB-C cable.
-
Power it on. The Complete Kit boots to a welcome screen; on the Basic Kit’s bare board, the red LED below the main board lights up.
-
Power off the device.
-
Hold the RP2040 boot button — on the side of the enclosure near the SpO₂ port (Complete Kit), or on the side of the main board (Basic Kit).
-
While still holding the button, power on the device. It reboots in programming mode and mounts as a USB drive named
RPI-RP2. -
Drag a
.uf2file onto the RPI-RP2 drive. The device flashes itself and reboots into the new firmware automatically.
When you click Upload in the Arduino IDE, the RP2040 is reset into the bootloader for you. Follow the steps above only if the board doesn’t appear as a serial port, or if you’re flashing a downloaded .uf2 by hand.
Once it’s running, connect the sensors — see Hooking up the Sensors — then view the signals in OpenView 2.
Everything above flashes the RP2040. If you’re moving a board from the earlier firmware to NEXT, you must also flash the ESP32-C3 with the HealthyBridge firmware — it currently carries a plain Bluetooth HCI controller image, which NEXT cannot talk to.
Flash only the RP2040 and you get working USB streaming, SD recording and vitals, but no Bluetooth at all. It takes one command: Programming the ESP32-C3.
Learn the board with the teaching sketches
Before you run the full firmware, it’s worth running a few sketches that do exactly one thing.
The Arduino firmware ships eleven standalone examples, each bringing up one sensor or one idea, short enough to read top to bottom. They’re the fastest way to understand how a biosignal actually gets from an electrode to a number — and they’re the reason to reach for the Arduino path even if you never touch the production firmware.
Sketches 01–07 each bring up a single sensor and print to the Arduino Serial Plotter or Serial Monitor at 115200 baud. They are plain single-core sketches: they share only board.h, the authoritative pin map, so no GPIO is ever hardcoded. Sketches 08–11 are the advanced ones.
| # | Sketch | Sensor | How to view it |
|---|---|---|---|
| 01 | 01_ECG_Plotter |
MAX30001 (ECG) | Serial Plotter |
| 02 | 02_Respiration_Plotter |
MAX30001 (BioZ) | Serial Plotter |
| 03 | 03_PPG_Plotter |
AFE4400 | Serial Plotter (IR + RED) |
| 04 | 04_SpO2 |
AFE4400 | Serial Monitor (SpO₂ %, no-finger safe) |
| 05 | 05_HeartRate |
MAX30001 (RtoR) | Serial Monitor (bpm + R-R interval) |
| 06 | 06_Temperature |
MAX30205 or AS6221 | Serial Monitor (°C, absent-safe) |
| 07 | 07_Vitals_Serial |
all three | Serial Monitor (combined line) |
| 08 | 08_OpenView_Stream |
all sensors | OpenView 2 (29-byte binary frame) |
| 09 | 09_RawProcessing |
all sensors | your own DSP in loop(), over the dual-core spine |
| 10 | 10_Wireless_Bridge |
all sensors | ESP32-C3 → BLE / Wi-Fi |
| 11 | 11_SD_Datalog |
all sensors | microSD (/REC*.BIN) |
Sketches 09 and 11 build on the HealthyPi5 library runtime and need Tools → os: “FreeRTOS SMP”. The rest run on the stock single-core core.
The Arduino Serial Plotter is the right tool for one or a few numeric channels — that’s sketches 01–07. OpenView 2 is for the full multi-channel binary stream (sketch 08 and the production firmware). The Serial Plotter cannot parse that packet; it’s the one thing it doesn’t do.
Each sketch prints labelled traces (ECG:123, IR:900,RED:1200) so the Serial Plotter names each line. The ECG and PPG sketches high-pass the signal to remove baseline drift — comment those lines out to see the raw sensor data, which is a good exercise in itself.
Setup takes about five minutes: Arduino Quick Start.
If you have the display add-on
The Arduino NEXT firmware does not drive the on-board LCD in this release — the LVGL vitals screen is held back pending hardware validation and will return in a later version. The display is currently driven by the Zephyr firmware. See Display Add-On Module.
Resources
- Buy — Crowd Supply · Mouser
- Arduino firmware (NEXT) — protocentral_healthypi_5_firmware
- ESP32-C3 wireless firmware — healthybridge-esp32
- Zephyr firmware — protocentral_healthypi5_zephyr
- Hardware design files — protocentral_healthypi_5
- Report a bug — GitHub Issues
