Haven't built anything lately? Is your soldering iron resting? No Arduino code lines to write? All right, let's change that! The Mini Macro Pad from ToxicActivity is a solid option: all we need is a pack of six buttons, a case, and some microcontroller based on the Atmega32U4. While many modern keyboards have multimedia controls, this Mini Macro Pad is more flexible, open source, and works on any operating system.
A couple of years ago I shared a tutorial to build a small volume control. The original design uses 3D-printed parts and an official Arduino Micro, but all those details are optional. I decided to build one on my own a few days later using the plastic container of a deodorant (no joke) and the most generic Pro Micro you can imagine. Not only does it work perfectly, but it has fallen to the floor half a dozen times without any consequence.
Mini Macro Pad: Multimedia Controls for Any PC
What do I propose today? Keeping the same spirit, with a bit more complexity. I say 'a bit' because actually, the only thing we'll do in this project is add additional controls. The Mini Macro Pad from ToxicActivity has exactly what we need: Volume control, Mute, Play/Pause, Forward and Rewind. It's small, connects via USB, and all the Arduino code is already available.
The component list is reduced to six buttons, a case, some wires, and a microcontroller compatible with the Atmega32U4. ToxicActivity uses a Leonardo Tiny as an example, but at $22 per unit, it doesn't make much sense (Pro Micro clones with USB-C cost 10 euros). The Arduino code at the bottom of the post reveals the correct pins for the connections: A0 and 11 are Forward and Rewind, A1 is Play/Pause, 9 is Volume Up, A2 is Volume Down, 10 is Mute, and pin 13 is occupied by the microcontroller's LED. Needless to say, nothing prevents you from changing those values. Not all microcontrollers are the same, but with just six pins, it's possible to use (almost) any variant.
The only truly mandatory step here is to install the HID-Project module by NicoHood in the Arduino IDE, otherwise it will spit out insults in several languages when you try to compile the code (Library Manager, search for 'nicohood', and HID-Project should appear). I also admit that controlling volume using buttons instead of an encoder doesn't convey the same feeling, but the design works very well, and it's an excellent starting point.
(Editor's note: I apologize for the delay; a new health issue appeared in the last few days. I'll return to regular programming as soon as possible.)
Official site and code: Click here