2wenty2wo / pico-usb-volume-controller

A Raspberry Pi Pico script for a volume control and game exit button for arcade/MAME cabinets, using a rotary encoder and an extra pushbutton.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Pico USB Volume Controller for Arcade/MAME Machines

Pico USB Volume Controller in action

Control volume and exit games with ease using the Raspberry Pi Pico and a rotary encoder.


πŸ“Œ Table of Contents


πŸ•Ή Introduction

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.


✨ Features

  • πŸ”Š 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.

πŸ“¦ Requirements

  • Hardware:

    • Raspberry Pi Pico
    • Rotary Encoder (with a push button)
    • Optional push button (for the ALT + CTRL + F4 feature)
  • Software:


πŸš€ Setup and Installation

  1. CircuitPython: Flash your Raspberry Pi Pico with CircuitPython. Guide.
  2. Code Transfer: Drag and drop the boot.py and code.py files onto your Raspberry Pi Pico.
  3. Lib Folder: Copy over the lib folder to your Raspberry Pi Pico.
  4. SuperF4 Setup: Install SuperF4 on your arcade machine.

πŸ”Œ Hardware and Wiring

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 Pico
    • B (S2) Pin -> GP10 on Pico
    • SW (Key) Pin -> GP12 on Pico
    • + Pin -> 3.3V on Pico
    • GND Pin -> GND on Pico
  • Game Exit Button:

    • One end -> GP13 on Pico
    • Other end -> GND on Pico

βš™οΈ Configuration

Check the code.py file for a configuration section at the top. Customize debounce delays, pin assignments, and more to fit your setup.


πŸ“š Resources


πŸ“ Code Base Source

Inspired by the multimedia-knob repository by Xitee1.

About

A Raspberry Pi Pico script for a volume control and game exit button for arcade/MAME cabinets, using a rotary encoder and an extra pushbutton.

License:MIT License


Languages

Language:Python 100.0%