Skip to content

Instantly share code, notes, and snippets.

View michaelkuty's full-sized avatar

Michael Kutý michaelkuty

View GitHub Profile
@michaelkuty
michaelkuty / monitor-volume
Last active December 18, 2017 23:08 — forked from savetheclocktower/README.md
Using a rotary encoder as a volume control for the Raspberry Pi
#!/usr/bin/env python3
"""
The daemon responsible for changing the volume in response to a turn or press
of the volume knob.
The volume knob is a rotary encoder. It turns infinitely in either direction.
Turning it to the right will increase the volume; turning it to the left will
decrease the volume. The knob can also be pressed like a button in order to
turn muting on or off.