GPIO assignment
The GPIO pins are the connections on the Raspberry Pi's pin header. The MuPiBox's accessories use them by their BCM numbers (GPIO 26 is not pin 26 of…
The GPIO pins are the connections on the Raspberry Pi's pin header. The MuPiBox's accessories use them by their BCM numbers (GPIO 26 is not pin 26 of the header, but the connection labelled “GPIO26”).
Pins the box uses
| Accessory | Function | GPIO (BCM) | Adjustable |
|---|---|---|---|
| Rotary knob | A (CLK) | 26 | no |
| Rotary knob | B (DT) | 24 | no |
| Rotary knob | Button | 10 | no |
| OnOff SHIM (also the MuPiHAT) | signal to shut down (gpio-poweroff) | 4 | in the configuration (shim.poweroffPin) |
| OnOff SHIM (also the MuPiHAT) | button (trigger) | 17 | in the configuration (shim.triggerPin) |
| Power cut (set by the box, not by the SHIM) | signal when switching off | 27 | in the configuration (shim.cutPin) |
| Status LED (a separate LED, not part of the SHIM) | status LED | 13 | yes, Settings › Battery & Power › Power switch and LED |
| Fan | PWM signal | 12 | yes, Settings › Battery & Power › Fan |
On your box this table shows only the pins that are in use there with the current settings: a fan that is switched off, or a rotary knob that is switched off, does not appear, and a pin you have changed shows its new number. Where the page cannot ask the box (for example on GitHub), it lists the pins as entered after installation.
Where else is the pin setting?
The pin for switching off is in two places, and both must match:
- in the box's configuration:
shim.poweroffPin, - in
/boot/config.txt: as the parametergpiopin=…of the overlaygpio-poweroff.
More on this and what happens with a duplicate line: The box hangs when shutting down.