Giter Site home page Giter Site logo

volume.control's Introduction

volume.control

image

A minimal implementation of a USB volume knob, utilizing a rotary encoder (volume increment, decrement) with a switch (mute). This firmware targets the specially crafted volume.control board, which is based on the RP2040 MCU.

The firmware itself is based solely on embedded Rust, and makes use of the Real-Time Interrupt-Driven Concurrency, or RTIC framework.

The host volume is controlled in the same way as it is controlled by keyboard media keys - by presenting the host with a USB-HID device, and dispatching Consumer Control HID reports indicating the Volume Increment 0xE9 , Volume Decrement 0xEA and Mute 0xE2 Usage IDs.

USB-HID functionality is provided by @dlkj's usbd-human-interface-device library, and by implementing a minimal, single-byte report descriptor:

image

Flashing firmware (PICOBOOT)

The latest firmware release can be found in the releases page.

To flash a new firmware to the volume.control board - keep the mute button pressed while plugging the volume.control into your host USB. The device should boot into PICOBOOT mode, which allows for updates using picotool.

flashing

Building

Building the firmware yourself is kept simple thanks to Cargo and elf2uf-rs:

~ git clone https://github.com/0xa10/volume.control
➜  volume.control git:(main) ✗ cargo build --release                                        
    Finished release [optimized] target(s) in 0.03s
➜  volume.control git:(main) ✗ elf2uf2-rs target/thumbv6m-none-eabi/release/volume-control volume-control.uf2

Recovery (BOOTSEL)

In case flashing fails catastrophically, or for some other reason the device does not boot into the application or PICOBOOT mode - it is possible to force it into BOOTSEL mode, by shorting the small pad on the top left corner of the board (orange arrow) to any ground pad (gray arrows) with a paper clip or conductor of your choice - whilst plugging into the USB port.

Screen Shot 2022-06-29 at 23 33 26

This will cause the volume.control board to boot to BOOTSEL mode, in which both the PICOBOOT interface and a Mass Storage Device interface will be available, allowing you to update it like you would a Raspberry Pi Pico or any equivalent board with a BOOTSEL button.

pini//grigio

2022

volume.control's People

Contributors

0xa10 avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.