USB Volume Knob
To get started with your Adafruit Trinket, first install the required drivers and add the board to your Arduino IDE.
Then, wire your rotary encoder to the Trinket pins as shown on the right. I also added some heat-shrink tubing around the solder joints of the rotary encoder’s pins as shown in the image at the top to avoid any accidental contact between them.
Next, download the Trinket USB Library and copy the TrinketHidCombo folder contained within that zip file to your %USERPROFILE%\Documents\Arduino\libraries\ folder.
Then restart the Arduino IDE and load the example sketch: menu File » Examples » TrinketHidCombo » TrinketVolumeKnobPlus
Finally, from the Tools menu:
- menu Tools » Board » Adafruit Trinket 8MHz
- menu Tools » Programmer » USBtinyISP
That’s it! You can now upload the sketch to the Trinket (menu Sketch » Upload) right after pressing the reset button.
The only thing left now is to find a suitable enclosure to fit it all in, as well as a nice big knob to put on top of the rotary encoder.