A USB volume knob enables you to finely tune your music on your computer. Rather than using the keys on the upper right side of my macbook's keyboard I like to use a physical knob. I decided to make my own :)
Emulating a keyboard is relatively simple and easy with the help of a Trinket. The Trinket's USB port is used for uploading the code, but you can also use it for some basic USB 1.1 devices (such as a volume control input). Since I wanted to us a physical turning knob I decided to use a rotary encoder as an input.
I decided to buy the Pro trinket, more pins so an expansion later on would be possible.
The rotary encoders pins are connected as seen in the diagram: common pin on ground, "A" signal encoder's pin on pin #0 and "B" on pin #2. For an extra mute function the encoder's last pin is connected to pin #1. I used pin 3, 4 & 5 on the Pro trinket. As long as you make sure the pins correspond to the pins in your code it is ok to switch to a different set.
The next step would be uploading the code and testing. Adafruit made a great turorial on that:
You download the latest Trinket library, install it in Arduino, copy the code from their website (adjust it if you want extra features) and upload the sketch