-
Notifications
You must be signed in to change notification settings - Fork 402
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
🐛 | GPIO documentation not up to date (usage of GPIO control) #1093
Comments
Since 2.0 these files are not used anymore, but GPIO control is used. But as this isn't updated in the wiki yet, I consider this an documentation bug. Thanks for the reminder |
I added some updates to the wiki: |
@s-martin can you give me the path, where i can change the pins of the buttons, please? |
Update the pins here: You can find more examples here: Then restarting the service with |
nothing works for me. sudo nano /home/pi/RPi-Jukebox-RFID/components/gpio_control/gpio_control.py sudo nano /home/pi/RPi-Jukebox-RFID/settings/gpio_settings.ini sudo nano /home/pi/RPi-Jukebox-RFID/components/gpio_control/install.sh I edited this out of mere desperation. |
I saw your comment on #1101: I'm currently documenting my setup. I'm not sure, if I did something special about it, but I used another wiring than in the documentation and created a new gpio_settings.ini from scratch. First of all, I'm using This is my wiring:
SW is unused. Theoretically this is pressing the button. But I think the press is nothing for the kids (they will rotate the knob, while pressing). This is my VolumeControl section in the gpio_settings.ini: [VolumeControl]
enabled: True
Type: RotaryEncoder
PinUp: 12
PinDown: 23
pull_up: True
hold_time: 0.3
timeBase: 0.1
functionCallUp: functionCallVolU
functionCallDown: functionCallVolD If this does not work, you can consider scripting a little bit. Because you might see better, what's happening behind the scenes: |
@s-martin |
@0x0lli: I suggest you use What's the output of |
@Huseriato @s-martin thanks for your help and patience!!!after all, it was a cheap but oh-so-bitter-mistake that I made; apparently, I didnt copy-paste the directory information but wrote a part of it myself. an "s" was missing in .../setting/... |
I guess it would help many people to add the command how to restart the gpio service to the gpio wiki. I was doing many (time consuming) reboots when playing around with the gpio settings before finding this command. |
@s-martin I wrote updates to the wiki pages. How can I submit them to you ? |
Can't you just click Edit on the page? I don't know, if special permissions are required. Otherwise just post them here in this issue, if you like. |
I did not want to deploy them before releasing 2.0 because they dont apply to current master version. Control Jukebox with buttons / GPIOAdd buttons to your jukebox to control volume, skip tracks and more. Before we start: Many, many fellow jukebox tweakers have contacted me to push Enough said, here we go. Pin numbering on the RPiOn your RPi there are pin numbers printed on the board. In the following we are not referring to the board numbers, but the Broadcom (BCM) pin numbering for the GPIO pins. You can find more information on this issue on the pin numbering section of the GPIO Zero documentation site. Any pin marked “GPIO” in the diagram above can be used as a pin number. A button attached to “GPIO17” would be specified in the script as pin number 17 rather than 11 (which would be the count on the board). Update September 2020The service which provides the functionality of GPIO-Control-Devices has seen numerous changes in the past. The most recent version was originally designed by @veloxidSchweiz und @veloxid. It has now been integrated in the one-line installscript and support also RotaryEncoders in addition to normal buttons. How to connect the buttonsIn the default configuration the GPIO-control-service uses the new pinout for minimal interferance with other GPIO-Devices, which are fixed on some PINs. Here is how to connect the buttons using the new pinout:
!!! IMPORTANT Only when using the above listed pins for wiring your shutdown pin you will be able to power-up the Raspberry PI from firmware halt. !!! How to install the GPIO-Control-ServiceWhen using the interactive version of the one-line installscript you will be asked if you want to activate the GPIO-Control-Service. Where to find the configuration of the GPIO-ServiceThe configuration file can be found here: Additional information:Circuit example(s) for the button wiringYou will be using push buttons, which are essentially the same as arcade buttons, meaning: when you press them down, they are ON, when you let go, the are OFF. So skipping a track is tapping a button once, changing the volume, each tap changes it a bit. The updated GPIO from pullrequest #306 added the option to hold down the volume buttons and change every 0.3 seconds the volume according to the configured volume steps. There are a number of different ways to connect a button. The easiest one is well explained on O'Reilly's RPi site:
Rotary knob for volume control (Drehknopf für Lautstärke)Update September 2020The service which provides the functionality of GPIO-Control-Devices has seen numerous changes in the past. The most recent version was originally designed by @veloxidSchweiz und @veloxid. It has now been integrated in the one-line installscript and support also RotaryEncoders in addition to normal buttons.
To install the GPIO-Control-Service check the GPIO-Button-Section of the wiki Circuit diagram(capacitors are optionally) Tested version: Used 3.3V Pin on Raspberry Pi. Connected everything without Capacitors.
Once you've got the hardware done, edit
to
After that restart the GPIO-Service: |
GPIO6 is Pin 31. So something is wrong here. Thank your for documentation. I prefer not to use PIN35, because it's reserved by HifiBerry Boards (Sound interface): https://www.hifiberry.com/docs/hardware/gpio-usage-of-hifiberry-boards/ |
@Huseriato good catch |
Updated the wiki and users report it works, so close this here. Please feel free to reopen the issue, if you still experience problems. |
Bug
Neither /RPi-Jukebox-RFID/scripts/gpio-buttons.py nor /RPi-Jukebox-RFID/misc/sampleconfigs/gpio-buttons.py.sample exists after using the one line installer --> GPIO Buttons cannot be integrated with Phoniebox.
What I did
Followed the instructions from https://github.com/MiczFlor/RPi-Jukebox-RFID/wiki/INSTALL-stretch to install the latest Raspian Buster/Phoniebox SW + Spotify. When asked about GPIO support I selected yes.
What happened
No GPIO scripts are available after installation. Both /RPi-Jukebox-RFID/misc/sampleconfigs/gpio-buttons.py.sample and /RPi-Jukebox-RFID/scripts/gpio-buttons.py are not available to configure GPIOs.
I expected this to happen
/RPi-Jukebox-RFID/scripts/gpio-buttons.py should be available after installation (as it was with previous installations).
Further information that might help
pi@raspberrypi:~ $ journalctl -u mopidy
-- Logs begin at Fri 2020-10-16 11:53:30 BST, end at Fri 2020-10-16 12:17:09 BST
-- No entries --
Software
Base image and version
Otherwise the output of
cat /etc/os-release
PRETTY_NAME="Raspbian GNU/Linux 10 (buster)"
NAME="Raspbian GNU/Linux"
VERSION_ID="10"
VERSION="10 (buster)"
VERSION_CODENAME=buster
ID=raspbian
ID_LIKE=debian
HOME_URL="http://www.raspbian.org/"
SUPPORT_URL="http://www.raspbian.org/RaspbianForums"
BUG_REPORT_URL="http://www.raspbian.org/RaspbianBugs"
Branch / Release
master
Installscript
cd; rm buster-install-*; wget https://raw.githubusercontent.com/MiczFlor/RPi-Jukebox-RFID/master/scripts/installscripts/buster-install-default.sh; chmod +x buster-install-default.sh; ./buster-install-default.sh
Hardware
RaspberryPi version
3 B+
RFID Reader
16c0:27db HXGCoLtd Keyboard
Soundcard
Hifiberry Miniamp
Other notable hardware
GPIO settings not available
The text was updated successfully, but these errors were encountered: