Beta. Pre-release software, expect rough edges.
Raspberry Pi wiring

The GPIO guide

None of this is required — a stock Pi runs the whole app headless, and you reach it from any browser. This is for planning a build: which header pins each optional accessory uses, and which combinations can share a board.

Interactive build planner

Select your accessories, see the whole build

Tap everything you're considering and the 40-pin header lights up every pin each one uses. The planner flags any real conflict — and where two accessories only share a bus or a ground, it tells you that's fine.

Raspberry Pi 4 · 40-pin header · tap a pin for details
13V3
5V2
3GPIO2SDA
5V4
5GPIO3SCL
GND6
7GPIO4
GPIO14TXD8
9GND
GPIO15RXD10
11GPIO17
GPIO18PCM12
13GPIO27
GND14
15GPIO22
GPIO2316
173V3
GPIO2418
19GPIO10MOSI
GND20
21GPIO9MISO
GPIO2522
23GPIO11SCLK
GPIO8CE024
25GND
GPIO7CE126
27GPIO0ID
GPIO1ID28
29GPIO5
GND30
31GPIO6
GPIO1232
33GPIO13
GND34
35GPIO19PCM
GPIO1636
37GPIO26
GPIO20PCM38
39GND
GPIO21PCM40
3.3V 5V Ground I²C bus GPIO Reserved · HAT ID Pin clash

Orientation: a Pi 4 stood upright — microSD top, power & HDMI left, USB & Ethernet bottom. Pin 1 top-left; pin 40 bottom-right.

HLK-LD2410C mmWave presence

Wakes the screen and Stream Deck as you walk up. Three wires — the sensor is 5V-powered with a 3.3V-safe output.

WireConnects to
VCCPin 2 · 5V
GNDPin 6 · GND
OUTPin 11 · GPIO17

⚠️ GPIO17 (pin 11) is claimed whenever this sensor is fitted, and the pin is fixed (no setting moves it), so the SparkFun Qwiic pHAT v2.0's onboard button, wired to the same GPIO17, rules that specific board out. A distance or proximity sensor on the STEMMA QT / Qwiic bus does the same job with no GPIO pins at all.

Wired UART barcode scanner

The same Waveshare-style scan engine that plugs into USB can wire straight to the header instead — no USB port used, no level shifter. It stays dark and idle until a scan page opens in the app, then lights up and reads (9600 baud on /dev/serial0).

WireConnects to
VCCPin 1 · 3V3
GNDPin 6 · GND
Scanner RXPin 8 · GPIO14 TXD
Scanner TXPin 10 · GPIO15 RXD

⚠️ TX to RX and RX to TX — the crossover is the classic mistake. Use the 3.3V version of the module and power it from a 3.3V pin: the Pi's serial pins are not 5V tolerant. A one-time sudo foodassistant-gadgets-setup frees the serial port from the login console, and the official Pi 4 case fan wants this same GPIO14 (pin 8) — fit one or the other. The module's TRIG pin stays unconnected.

I²S amplifier (e.g. MAX98357A)

Real audio out for spoken timers and alerts. I²S is a separate bus from I²C, so an amplifier and your whole Qwiic chain coexist happily — they never share a pin.

WireConnects to
BCLKPin 12 · GPIO18
LRCLKPin 35 · GPIO19
DINPin 40 · GPIO21
VinPin 4 · 5V
GNDPin 39 · GND

⚠️ GPIO18 doubles as the Pi's main PWM pin, so an I²S amp can't share a board with an addressable-LED strip or a Pi 4 case fan driven on GPIO18.

Piezo buzzer

A cheap audible ping when you do not need full audio. Any spare GPIO with a series resistor works; these four are free after I²C, presence, and I²S.

WireConnects to
SignalAny of pins 15 · 16 · 18 · 22
GNDA nearby ground

⚠️ An active buzzer needs only on/off; a passive one needs a PWM tone. Keep a resistor in series — a GPIO pin is safe to ~16mA, not a power supply.

GPIO case fan

A small PWM fan driven from a GPIO pin. The official Raspberry Pi 4 case fan's control wire lands on GPIO14 (pin 8). A Pi 5 has a dedicated fan header and needs none of this.

WireConnects to
ControlPin 8 · GPIO14 (Pi 4)
Power5V · GND

⚠️ On GPIO14 it wants the UART scanner's pin; on GPIO18 it collides with the I²S clock. A Pi 5 sidesteps both with its own fan header.

STEMMA QT / Qwiic cable to the header

A solderless 3.3V I²C bus on a 4-pin JST-SH cable — the plug-in ecosystem for small sensors and controls. A plain cable (Adafruit 4397) lands on four header pins and leaves the rest free. Chain many devices on the same two data pins.

WireConnects to
🔴 Red · 3.3VPin 1 · 3V3
🔵 Blue · SDAPin 3 · GPIO2
🟡 Yellow · SCLPin 5 · GPIO3
⚫ Black · GNDPin 9 · GND

⚠️ Ground on pin 9, not pin 6 — it keeps the red 3.3V wire clear of the 5V pins (2 and 4). I²C is a shared bus: each device needs its own address, and 3.3V only, never 5V.

Adafruit Pi Stemma QT breakout

Adafruit's own plug-on route: a 2x3 socket that caps the six pins at the pin-1 corner and gives one STEMMA QT port, no soldering. Its own 3.3V regulator feeds the port, so it does not lean on the Pi's small 3.3V rail, and a green LED confirms power.

WireConnects to
OccupiesPins 1–6 (plug-on socket)
GivesOne STEMMA QT port (bus on 3 · 5)

⚠️ A socket, not a thin wedge: a HAT cannot seat on the header while it is fitted (that is the SHIM's trick), and it caps the same corner the presence sensor and a header-powered DSI display's power want. It pulls off in a second when you need the pins back.

Qwiic / STEMMA QT SHIM

A thin board that friction-fits onto pins 1–6 and gives you one Qwiic port, no soldering. Its trick is that it is thin enough that a HAT still seats on top of it, so a PoE HAT and a Qwiic port can coexist.

WireConnects to
OccupiesPins 1–6 (friction-fit)
GivesOne Qwiic port (bus on 3 · 5)

⚠️ It draws 5V and regulates its own 3.3V, so it does not lean on the Pi's small 3.3V rail. The catch is mechanical: it wants all six of pins 1–6, where a header-powered DSI display's power jumpers and the presence sensor's power and ground also live (a pogo-pin DSI panel does not care). A SparkFun board; Adafruit listed it under both names but now stocks its Pi Stemma QT socket instead.

Qwiic / STEMMA QT pHAT

A board that gives four Qwiic / STEMMA QT ports at once (SparkFun's board, sold under both names). It is the tidiest option if the Pi has nothing else on its header, and the least flexible if it does.

WireConnects to
Seats onThe 40-pin header
BusPins 3 · 5 (SDA · SCL)
PowerPins 1 · 9

⚠️ The SparkFun Qwiic pHAT v2.0 wires its onboard button to GPIO17 (pin 11), the fixed pin the presence sensor is read on, so that board and the sensor cannot share a Pi. Without the sensor the button is harmless; the app ignores it. The older button-free Qwiic / STEMMA QT HAT is discontinued.

PoE / PoE+ HAT — passthrough

Power and network over one Ethernet cable, with the 40 pins presented again on a second row on top, so other header accessories still fit — subject to how much room is left above the board.

WireConnects to
48V inSeparate four-pin PoE header
5V outPins 2 · 4 (5V rail)
HeaderPassed through on top

⚠️ Buy PoE+ (802.3at, ~25W), not plain PoE. A Pi 5 needs a Pi-5 PoE HAT. Clearance above the board for a second HAT is rarely published — check the height.

PoE / PoE+ HAT — covers the header

The common shape: a 40-pin connector that spans every pin and stops there. Simple, but it ends every header route on this page.

WireConnects to
48V inSeparate four-pin PoE header
5V outPins 2 · 4 (5V rail)
HeaderCovered — no pins reachable

⚠️ If any other accessory needs a header pin, this shape rules it out. The Qwiic SHIM is the one exception — it fits underneath.

PoE / PoE+ HAT — corner-landing

The friendly shape: it lands on the block of six pins at the pin-1 corner and breaks the rest back out on its own small header, leaving GPIO17, the I²S pins, and more free.

WireConnects to
Seats onPins 1–6 (corner block)
Breaks out5V · 3V3 · GND on its own header
Leaves freePins 7–40

⚠️ The catch is mechanical: the pins it doesn't claim are electrically free, but you must be able to land a jumper on them under the board. Wire what you need before the HAT goes on, and route the wires out sideways.

DSI touch display

Video and touch both ride the DSI ribbon on their own buses, so no signal ever touches the 40-pin header and the display can't collide with a Qwiic chain no matter how many sensors you add. Power depends on the panel: many (the Hosyond 7 inch among them) mount the Pi on their back and feed it through pogo pins against the underside, using no header pins at all. Others take 5V and ground from the header, the case shown here.

WireConnects to
Video + touchDSI ribbon (not the header)
Pogo-pin panelsPads under the Pi (header stays free)
5V jumper (header power)Pin 2 or 4 · 5V
GND jumper (header power)Any ground (6, 9, 14…)

⚠️ Check your panel's power method. A pogo-pin panel leaves the whole header free. With header power, separate jumpers land on any free 5V and ground, but the official Touch Display 2's one-piece plug seats on pins 2, 4, and 6 and takes both 5V pins with it. Either way the display draws through the Pi, so count it in the supply budget (a Pi 5 wants the 27W brick on a full build).

🔗 What plugs into the Qwiic bus

STEMMA QT and Qwiic are the same 4-pin connector, so either brand works. Every device daisy-chains onto the same two data pins (3 & 5) — there's no real limit on count, only that each needs its own I²C address (many are jumper-settable) and the whole chain stays under about a metre. The app lists any board it sees on the bus, so an unsupported one shows up as "seen", not as a bad cable.

Adafruit NeoKey 1×4Shipped

A four-key scan-mode pad — lit keys switch what a barcode scan does

I²C 0x30–0x33
VL53L1X time-of-flightComing

Wake on approach; distance threshold

I²C 0x29
APDS9960 proximityComing

Wake on approach

I²C 0x39
AHT20 temp + humidityComing

Fridge / room readings into the sensor feed

I²C 0x38
SHT4x temp + humidityComing

Fridge / room readings

I²C 0x44
MCP9808 precision tempComing

Accurate temperature

I²C 0x18
ANO rotary encoderPlanned

Spin to extend a timer, press to dismiss a ringing alarm

I²C 0x49
NeoDriver status lightPlanned

Glows red for an alarm, pulses for a timer

I²C 0x60
VEML7700 / BH1750 lightPlanned

Auto-dim the kiosk to the room

I²C 0x10 / 0x23
BMP390 barometricPlanned

Altitude-aware recipe adjustment

I²C 0x77

Status reflects driver support rolling out over time. NeoKey ships today; the rest are on the way. Any 3.3V I²C sensor is electrically fine to wire now — support is about the app reading it, not the bus carrying it.

Power

Powering the Pi

Pick one primary source. The three are not equal.

🔌

USB-C supply Recommended

A Pi 4 wants 5V/3A (15W); a Pi 5 wants the official 27W (5V/5A). A Pi 5 only raises its shared USB budget to 1.6A once it sees a real PD supply — so a build with a display, Stream Deck, scanner, and printer needs the 27W brick, not less.

PoE+ HAT Wall / shelf mount

Power and network over one Ethernet cable. Buy PoE+ (802.3at, ~25W), not plain PoE. A Pi 5 needs a Pi-5 PoE HAT — the 4-pin PoE header moved to the other edge of the board.

⚠️

GPIO 5V pins Not recommended

You can feed 5V into pins 2 or 4 and the Pi runs, but those pins sit in front of no protection circuitry. Fine for a HAT built to do it; risky as your primary supply.

Good to know

Sharing a board

The gotchas that decide whether two accessories can sit on the same Pi.

I²C is a shared bus

Every STEMMA QT / Qwiic device lives on pins 3 and 5. Each just needs its own address, so you can chain a dozen without ever using a new pin.

I²S and I²C never collide

An I²S speaker (pins 12, 35, 40) and your whole Qwiic chain (pins 3, 5) run at the same time — different buses on different pins.

The real pin clashes

GPIO17 (pin 11): the presence sensor's OUT vs the SparkFun Qwiic pHAT v2.0's onboard button, and the presence pin is fixed, so it cannot move out of the way. GPIO14 (pin 8): a wired UART scanner vs the official Pi 4 case fan. GPIO18 (pin 12): the I²S clock vs an addressable LED strip. Fit one from each pair.

DSI power comes two ways

Some panels (the Hosyond 7 inch among them) mount the Pi on their back and power it through pogo pins against the underside, using no header pins at all. Others take 5V and ground from the header; the official Touch Display 2's one-piece plug seats on pins 2, 4, and 6, covering both 5V pins. Check your panel's manual before planning that corner.

The serial port starts busy

The Pi boots with a login console on the UART pins. A one-time sudo foodassistant-gadgets-setup frees /dev/serial0 for a wired scanner — the SD image can have done it at install time already.

A HAT and a Qwiic port can share

A Qwiic / STEMMA QT SHIM is thin enough that a PoE HAT still seats fully on the header on top of it, so you can have both on one Pi. Adafruit's Pi Stemma QT socket is the plug-on alternative when nothing needs to stack: it caps the six corner pins, so fit it where no HAT has to seat.

A GPIO pin is not a power supply

Safe to about 16 mA; the 3.3V rail was designed around roughly 3 mA per pin. Load every pin and the rail collapses.

Pi 4 vs Pi 5

The 40-pin header is identical on both. Only the separate PoE header moved, so PoE HATs are not cross-compatible between the two.

Pins 27 and 28 belong to HATs

They carry the ID EEPROM bus a HAT uses to identify itself at boot. Wire nothing to them — they are marked reserved on the pin map.

Planning a build?

The full pin map, accessory compatibility, and power details live in the hardware docs — including the wired UART barcode scanner guide.

Try the live demo