Control volume and exit games with ease using the Raspberry Pi Pico and a rotary encoder.
- πΉ Introduction
- β¨ Features
- π¦ Requirements
- π Setup and Installation
- π Hardware and Wiring
- βοΈ Configuration
- π Resources
- π Code Base Source
This project provides a simple and effective solution for volume control and game exit functionality for Arcade/MAME machines using a Raspberry Pi Pico and a rotary encoder.
- π Volume Control: Twist the encoder to adjust the volume.
- π Mute Feature: A quick press mutes and unmutes the audio.
- πͺ Exit Games: An additional button sends the
ALT + CTRL + F4
command to exit games. - π HID Integration: The Raspberry Pi Pico acts as a HID when connected, making it a plug-and-play solution.
-
Hardware:
- Raspberry Pi Pico
- Rotary Encoder (with a push button)
- Optional push button (for the
ALT + CTRL + F4
feature)
-
Software:
- CircuitPython: Flash your Raspberry Pi Pico with CircuitPython. Guide.
- Code Transfer: Drag and drop the
boot.py
andcode.py
files onto your Raspberry Pi Pico. - Lib Folder: Copy over the
lib
folder to your Raspberry Pi Pico. - SuperF4 Setup: Install SuperF4 on your arcade machine.
Components:
- Raspberry Pi Pico
- Rotary Encoder (with a push button)
- Optional push button for game exits
Wiring Guide:
-
Rotary Encoder:
A (S1) Pin
->GP9
on PicoB (S2) Pin
->GP10
on PicoSW (Key) Pin
->GP12
on Pico+ Pin
->3.3V
on PicoGND Pin
->GND
on Pico
-
Game Exit Button:
- One end ->
GP13
on Pico - Other end ->
GND
on Pico
- One end ->
Check the code.py
file for a configuration section at the top. Customize debounce delays, pin assignments, and more to fit your setup.
Inspired by the multimedia-knob repository by Xitee1.