-
1Print the printed parts... please.
Print the 3 STLs in the repository: Chassis v1.stl, Knob v1.stl (unless you're using the knob that came with the encoder, but I preferred my minimal design) and Lid v1.stl.
-
2Wrestle with the wiring
Mock the parts up inside the chassis to get an idea for wire lengths, then solder it all together outside of the chassis for better access. Check the encoder's Data Sheet for pinouts if you're not sure, but the general idea is:
- Encoder channel A to Digispark pin 0
- Encoder channel B to Digispark pin 2
- Encoder common to Digispark pin GND
- Encoder switch pin 1 to Digispark pin 1
- Encoder switch pin 2 to Digispark 5V
-
3Copy the code
The code to load onto the Digispark is just the Adafruit "Trinket USB Volume Knob" code, as their Trinket uses the same Attiny85 chip as the Digispark so they're 100% compatible. If you know what you're doing, you can copy/paste the code from my repository (don't forget to add the "TrinketHidCombo.h" library before compiling) or if you need more details, follow their tutorial here and make sure you use the extra code from the "Add a Mute Button" page if you got an encoder with clicky switch.
Discussions
Become a Hackaday.io Member
Create an account to leave a comment. Already have an account? Log In.