Thingiverse
USB volume control
par tyfoza
3
Téléchargements
2
Likes
0
Makes
USB volume control for Windows
https://www.instructables.com/Digispark-Volume-Control/
Code and wiring
https://learn.adafruit.com/trinket-usb-volume-knob/code
I used cheap MCU board Digispark Attiny85.
Library "Trinket USB Keyboard" for Arduino IDE.
Code is example named TrinketVolumeKnobPlus.
I missed the MUTE indication in the original DIY project. The MCU board does not have a free digital pin for software LED switching. I solved it with a flip-flop switched by pressing a rotary encoder.
If you need switch LED on start:
Add this:
pinMode(PIN_ENCODER_SWITCH, OUTPUT);
// the switch is active-high, not active-low
// since it shares the pin with Trinket's built-in LED
// the LED acts as a pull-down resistor
digitalWrite(PIN_ENCODER_SWITCH, HIGH);
delay(200);
pinMode(PIN_ENCODER_SWITCH, INPUT);
https://www.instructables.com/Digispark-Volume-Control/
Code and wiring
https://learn.adafruit.com/trinket-usb-volume-knob/code
I used cheap MCU board Digispark Attiny85.
Library "Trinket USB Keyboard" for Arduino IDE.
Code is example named TrinketVolumeKnobPlus.
I missed the MUTE indication in the original DIY project. The MCU board does not have a free digital pin for software LED switching. I solved it with a flip-flop switched by pressing a rotary encoder.
If you need switch LED on start:
Add this:
pinMode(PIN_ENCODER_SWITCH, OUTPUT);
// the switch is active-high, not active-low
// since it shares the pin with Trinket's built-in LED
// the LED acts as a pull-down resistor
digitalWrite(PIN_ENCODER_SWITCH, HIGH);
delay(200);
pinMode(PIN_ENCODER_SWITCH, INPUT);
Vous avez imprimé ce modèle ? Connectez-vous et partagez votre make !
Connectez-vous pour laisser un commentaire
Se connecterPas encore de commentaires – soyez le premier !