Footswitches and encoder
On a Raspberry Pi, up to 8 footswitches and a rotary encoder can be wired straight to the GPIO header. No extra board, no resistor: each input is wired between its GPIO and ground, and the Pi’s internal pull-ups do the rest.
- Momentary footswitches (SPST, normally open), the kind used for tap tempo.
- Optionally, a rotary encoder with a push button (the common EC11 type).
- Wires to the Pi’s 40-pin header, ideally through a connector so the box can be opened.
Default wiring
Section titled “Default wiring”| Input | GPIO (BCM) | Header pin |
|---|---|---|
| Footswitch 1 | 17 | 11 |
| Footswitch 2 | 27 | 13 |
| Footswitch 3 | 22 | 15 |
| Footswitch 4 | 23 | 16 |
| Encoder A | 5 | 29 |
| Encoder B | 6 | 31 |
| Encoder button | 13 | 33 |
| Ground | 6, 9, 14, 20, 25, 30, 34, 39 |
Wire the other leg of each switch, and the encoder’s common pin, to a ground pin.
Settings → Hardware
Section titled “Settings → Hardware”Settings → Hardware sets what is wired:
- Footswitches: from none to 8, and the GPIO of each. A LED next to each one lights while it is pressed, to check the wiring.
- Tap tempo on the last footswitch: on by default with two switches or more. The last switch then taps the tempo, and held, opens the tuner.
- Encoder: its A and B GPIOs, its push button or none, and its steps per detent. Lower the steps if it takes several clicks to move.
Changes apply at once and are kept on the data partition.
What they do
Section titled “What they do”The footswitches follow the mode of the Live page: blocks on and off in Stomp mode, scenes in Scenes mode, presets in Setlist mode. They act when pressed.
The encoder
Section titled “The encoder”The encoder drives the whole UI without the touch screen. Turn to move, press to open or
adjust, hold (0.6 s) to go back. A frame shows what is focused; it gets thicker while you
adjust a value. On a USB keyboard, the arrows turn, Return presses and Escape holds.
| Page | Turn | Press | Hold |
|---|---|---|---|
| Rack | Select a block; past the last one, the + button (an empty rack starts there) | Open the block’s editor, or on + the Add effect page | Page switcher |
| Block editor | Go through the controls, Arrange, On and the bin | Adjust the control | Back to the rack |
| Add effect | Go through the list | Add the block | Back to the rack |
| Presets | Pick a preset | Load it | Page switcher |
| Live | The switches, then the tempo, tap and the mode | Act like the footswitch, or adjust the tempo | Page switcher |
| Looper | Record, Overdub, Play, Stop, Undo, Clear and the level | Trigger it, or adjust the level | Page switcher |
| Tuner | Mute and the reference pitch | Toggle mute, or adjust the pitch | Page switcher |
Adjusting a value
Section titled “Adjusting a value”A block’s control, the tempo, the looper’s level and the tuner’s reference pitch work the same way:
- Press to start adjusting.
- Turn to change the value.
- Press to keep it, or hold to go back to the value before.
A switch flips at once on a press.
Page switcher
Section titled “Page switcher”Holding on a main page opens the page switcher: Rack, Presets, Live, Tuner, Looper and Settings. Turn to pick a page, press to open it. Tapping a page works too.
Hold also goes back one level elsewhere: it closes the power dialog, leaves the store and the setlists.
Knob encoders (I2C)
Section titled “Knob encoders (I2C)”Encoder boards on the I2C bus give the rack’s knob strip real knobs, one encoder per field:
- Adafruit I2C rotary encoders (seesaw, addresses 0x36 to 0x3D);
- the Adafruit Quad rotary encoder (0x49 to 0x50);
- the M5Stack 8Encoder (0x41).
Wire SDA to GPIO 2 (pin 3), SCL to GPIO 3 (pin 5), and power and ground. Several boards of the same kind chain on the bus, and their encoders count in address order. The image turns the I2C bus on.
| Encoder | Turn | Press | Hold |
|---|---|---|---|
| 1 to 5, knob | Change the value | Swap with the value before the turns (A/B) | Back to the default |
| 1 to 5, switch | Flip it | Flip it | Back to the default |
| 1 to 5, list | Step through it; open, move through it | Open it; open, pick | Back to the default; open, close it |
| 1 to 5, presets or model | Open the list, then move through it | Open the list, then pick | Close the list |
| 6 | The strip’s pages |
Settings → Hardware sets the board, the counts per detent and the direction, and says
which addresses answered. Without boards, the keys a s d f g h turn encoders 1 to 6 (with
Shift, the other way) and z x c v b n press them (with Shift, hold), on the rack page.