Skip to content

Latest commit

Β 

History

History
95 lines (63 loc) Β· 1.82 KB

File metadata and controls

95 lines (63 loc) Β· 1.82 KB

πŸŽ›οΈ VolControl

A DIY volume knob & device switcher for Windows
Built with Arduino Pro Micro + Python ✨


πŸ” Overview

VolControl transforms an Arduino Pro Micro (ATmega32U4), an SSD1306 OLED screen, and an EC11 rotary encoder into a sleek volume controller.

  • πŸ”Š Rotate the encoder β†’ Adjust system volume
  • 🎧 Press the encoder β†’ Switch audio device (via F13 key + SoundSwitch)
  • πŸ’‘ F13 is chosen because it’s unused (i think) in Windows, avoiding conflicts

πŸ› οΈ Hardware

  • Arduino Pro Micro (ATmega32U4)
  • SSD1306 OLED display (128Γ—64, I2C)
  • EC11 rotary encoder with push-button
  • Jumper wires / breadboard (or custom PCB)
  • 3D Printed case (Optional)

πŸ’Ύ Software

1. Arduino Sketch

  1. Open main.cpp in the PlatformIO.
  2. Verify/adjust I2C pins and encoder pins if needed.
  3. Upload to the Pro Micro.

2. Python Controller (PC)

VolControl-SerialCOM.py, A Python script reads serial data and controls Windows volume using PyCAW.

  1. Install Python 3.6+

  2. (Optional) Create & activate a virtual environment:

    python -m venv venv
    # Linux/macOS
    source venv/bin/activate
    # Windows
    venv\Scripts\activate
  3. Install dependencies:

    pip install -r requirements.txt
  4. Plug in VolControl via USB and run:

    python VolControl-SerialCOM.py

πŸš€ Usage

  • πŸ”Š Rotate encoder β†’ Increase / Decrease volume
  • 🎧 Press encoder β†’ Change device

πŸ“¦ Prerequisites

Arduino Libraries

  • Adafruit_SSD1306
  • Adafruit_GFX
  • Encoder
  • HID-Project

Python Packages

Provided in requirements.txt:

comtypes
pycaw
pyaudio
pyserial

Windows Software