MuPiBox Documentation MuPiBox Classic

Rotary knob and button

A rotary knob with button (rotary encoder in the style of the KY-040) makes the volume easy to reach for children's hands. You switch it on in the app…

A rotary knob with button (rotary encoder in the style of the KY-040) makes the volume easy to reach for children's hands. You switch it on in the app under Settings › Audio › Rotary knob and button.

Connection

Rotary knob connectionGPIO pin of the Raspberry Pi
A (CLK)26
B (DT)24
Button10 (the button switches to GND)

If the knob turns the wrong way, swap connections A and B.

Settings

SettingEffect
Rotary knob for the volumeswitches the knob on (after installation it is off)
Step per detenthow many percent each detent changes the volume, 1 to 10 (default 5)
Function of the button (GPIO 10)Off, Play/Pause, Next track, Track selection (press to switch) or Fast-forward

The volume maximum (Audio › Volume › Maximum (hearing protection)) also applies to the knob: it never turns louder than allowed (Sound and volume). The choice of button behaviour and the step size take effect at once. Switching the knob on and off restarts its service.

The button

FunctionOne press
Play/Pausepauses playback or starts it again
Next trackjumps to the next track
Track selection (press to switch)switches the knob between volume and track selection (see below)
Fast-forwardjumps 30 seconds ahead
Offdoes nothing

Choosing tracks with the knob

If Track selection (press to switch) is chosen, the button is a switch:

  1. First press: the knob now chooses tracks instead of the volume. Each detent to the right jumps to the next track, each detent to the left to the previous one.
  2. Second press: the knob sets the volume again.

Track selection also ends by itself: 10 seconds after the last press or the last turn. Every turn starts the time again. So if you keep turning, you stay in track selection. The first press itself does not yet jump to the next track.

If it does not react

  • Is the Rotary knob for the volume switch on? The service only starts then.
  • Check the wiring of pins 26, 24 and 10 (GPIO assignment).
  • The service is called mupi_rotary.
© 2026 MuPiBox