Use the Raspberry Pi Pico as an multimedia knob to control your PC volume and play/pause music.
As a base of the code, I use Raspberry Pi Pico - CircuitPython volume knob, made by maxmacstn.
With the original version, the knob very often stopped working. Either after sleep, reboot or just randomly while the PC is on. With this version it works very reliably. I haven't had to re-plug the Pi Pico for a few weeks now and it survived all sleep/wake cycles and reboots.
Note: When opening Thonny on the PC it might stop working again. Close Thonny (or better restart you PC), then plug out, wait 5-10 secs until Windows realizes it, then plug it back in.
- Prints messages only when in debug mode
- Does not automatically mount the storage. This cleans up the file explorer a bit. To edit the code, hold the button down while plugging the Pi in. If that does not work you can alternatively type the commands mentioned in the program at the top.
As I don't use it, I have removed the mode changing function. I haven't fully removed it but only removed the function to change the "currentMode". It should be rather easy to add it back in.
- Download the CircuitPython UF2 file
- Plug in the Pi Pico while holding the bootload button
- The Pico mounts as storage device on you PC
- Copy the UF2 file in the root directory of the Pico
- The Pico will install CircuitPython and then automatically reboot
- After reboot, you should see a storage device called "CIRCUITPY"
- Copy all files of the "pico" directory on github into that storage device
- Re-plug the Pi and try if it works
You can also watch this Tutorial. It is also made by the original creator of this program (GH: maxmacstn / YT: magi).
The original creator of this script also made this case for it.