Hello ladies and gentlemen
I am happy to release my plugin GPIO Control which allows Volumio to control GPIO pin states when certain events occur.
With this plugin you can control LEDs and pretty much anything else running connected to your raspberry pi! I currently use it to illuminate and an LED whilst music is playing and when the system starts turns on 12v audio amplifier and illuminate a system on LED.
This is based on tomatpasser’s gpio-buttons.
Tested on a Pi Zero and running stable for weeks now.
I did try supporting PWM which would have been great with the volume changed event but ran into issues. I used a library called pigpio but it required sudo permissions to access the hardware PWM. I didn’t want to ruin Volumio with my implemented with my limited knowledge!
The currently supported Volumio events are:
- system startup
- system shutdown
- music start
- music stop
- music pause
For each event, a GPIO pin can be assigned from the GUI and the state defined as shown below:
Schematic showing how to wire an LED on GPIO pin 17 and how to control a generic device at 12v.
Warning: Take care when connecting stuff to the GPIO pins. If done incorrectly the Pi can be damaged.
Thanks for looking!