NOTE: This repository is not up to date, development has moved here: https://github.com/volumio/volumio-plugins/tree/master/plugins/system_controller/gpio-buttons
Work in progress for a GPIO button plugin for volumio2 on the raspberry pi. Uses node js library 'onoff'.
Currently 6 actions can be attached to gpio pins: Play/pause, Vol+, Vol-, Next track, Previous track and shutdown.
- Download zip for install in volumio2 here: http://tomatpasser.dk/gpio-buttons.zip
- Got to Plugins -> Upload plugin and upload the file
- Each action can then be enabled and the GPIO pin selected.
The pin numbers entered should be GPIO pin numbers. The GPIO pins have an internal pull-up/pull-down resistor. The default value for each pin is shown below. As of now it is not possible to control the pull in the configuration.
Remember never to connect 5V to the GPIO pins, only 3.3V or ground.
Connection of a GPIO to a voltage higher than 3.3V will likely destroy the GPIO block within the SoC.
The button should be wired between the GPIO pin and opposite voltage as the default pull. The plugin will detect any change on the GPIO pin.
Example: If using GPIO pin 17, the button should be wired between the pin and 3.3V (high) because the default pull is low for GPIO pin 17.
|GPIO Pin||Default pull||GPIO Pin||Default pull|
Schematic showing wiring example for pin 17
- Control of internal pull resistor
- Support for rotary encoder to control volume
- Custom commands