Coder Social home page Coder Social logo

dawiki2018 / gpio-buttons Goto Github PK

View Code? Open in Web Editor NEW

This project forked from thomaspasser/gpio-buttons

0.0 1.0 0.0 53 KB

Control volumio2 on RPi with GPIO buttons

Home Page: http://tomatpasser.dk/gpio-buttons.zip

JavaScript 89.26% Shell 10.74%

gpio-buttons's Introduction

gpio-buttons

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.

GPIO Buttons interface

#Installation

  • 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
2 high 15 low
3 high 16 low
4 high 17 low
5 high 18 low
6 high 19 low
7 high 20 low
8 high 21 low
9 low 22 low
10 low 23 low
11 low 24 low
12 low 25 low
13 low 26 low
14 low 27 low

Schematic showing wiring example for pin 17

#TODO

  • Control of internal pull resistor
  • Support for rotary encoder to control volume
  • Custom commands

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.