If you have a rotary encoder with a built-in switch, you can even extend this project to turn it into a volume/mute control
How it works!
The Trinket's USB port is used for uploading sketches, but you can also use it for some basic USB 1.1 devices. For example, under USB 1.1, you can make low speed USB devices such as...
- HID devices
- mouse
- keyboard
- joystick/gamepad/flightsim
- many more... the drivers come from the operating system
- MIDI devices (input notes from sensors, or generate outputs from notes, etc)
- Custom devices (you have to write your own driver though)
- There are a few more rare applications
The easiest and most useful are HID devices. Such as a USB keyboard (link to another tutorial).
Today, keyboards have multimedia keys, such as play/pause or volume control. I will show you how to combine a Trinket and a rotary encoder to create a USB volume control knob.
Text editor powered by tinymce.