-
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 Pinout in documentation example doesn' fit to code #259
Comments
Super, vielen Dank ! Bin bisher am Shutdown verzweifelt. Jetzt klappst auf Anhieb. |
Hi @marcohorstmann |
Hi @marcohorstmann, do you connect the buttons directly to your Pi or do you use additional pull-up resistors? Thanks! |
Hi @marcohorstmann
!!! IMPORTANT Only when using this pins for wiring you are able to to powerup the Raspberry PI from firmware halt. !!! |
Hi @MiczFlor, Hi @Franzformator
I readed at little bit and the easiest way seems to add pull_up_True to all other buttons. I will try it later with my pi if this works. But it seems that using hardware resistors is the more save way. |
Hi @marcohorstmann, I think you are right. The best way should be to add pull_up_True for all buttons. This should avoid floating states of the ports. |
Hi @Franzformator yeah it would work. Every GPIO has Pullups from 50-65 kOhm. If you use a external resistor I need to keep in mind that more voltage is used. @MiczFlor : I changed all buttons to pull_up=True, works fine for me. Also I noticed that there is a 7th button, a mute button I had ignored before This is now the running gpio-buttons.py in my box.
|
Please keep in mind that the recommendation (https://www.elektronik-kompendium.de/sites/raspberry-pi/2006051.htm (german)) is to use external pull-up resistors and leave the internal ones off. So i would recommend to either edit the GPIO-BUTTONS.md in a way that clarifies that there are two ways of adding buttons (one with external pull-ups, one without) and as well mention that in each case the gpio-buttons.py looks slightly different OR decide for one way and only mention the second way with a footnote like a link to eg. this issue. |
In my opinion we should edit the Phoniebox script for using the internal pull-up resistors. It is right that without external resistors it could come to unwanted behaviour if the script is wrong. But for me the Phoniebox is a project were the Raspberry-Pi inserted in a box for ever and there is no other software running on this Raspberry-Pi. So there is no risk of reconnecting the buttons in a wrong way after closing the box. Also it is much easier to build your own box without handling these external resistors. |
I think in Elektronik Koompendium they thinking about people which are experimenting with hardware. We have a fixed solution where I don't want to do changes to wiring so i think this is safe enough. |
Hi @marcohorstmann @Franzformator |
Yes please. I've grilled my raspberry this morning 5V on GND and all lights went off. |
Hi @marcohorstmann @Franzformator |
@MiczFlor looks good for me. |
Hi, |
Hi @MTam86, yeah that's possible. See https://github.com/MiczFlor/RPi-Jukebox-RFID/wiki/Audio-RotaryKnobVolume Kind regards |
Hi,
I had tried this evening to prepare wireing for GPIO buttons and I must say that
the example in docs doesn't fit to the code. I've written down how I had to
connect everything to work with the GPIO script and even system power on
works with my wireing. (Wasn't undocumented)
I will update later the documentation and try to build a picture how to wire it.
Because the notepad maybe lost here my notes for later:
Volume Down
GPIO19 (PIN35) and GND (PIN39)
Volume Up
GPIO16 (PIN36) and GND (PIN34)
Play/Pause/Halt (or how you call it)
GPIO21 (PIN40) and GND (PIN25)
Next
GPIO26 (PIN37) and GND (PIN30)
Previous
GPIO20 (PIN38) and GND (PIN20)
Shutdown (you need to hold button for 2 secs for shutdown)
GPIO3 (PIN5) and GND (PIN6)
!!! IMPORTANT Only when using this pins for wiring you are
able to to powerup the Raspberry PI from firmware halt. !!!
Kind regards
Marco
The text was updated successfully, but these errors were encountered: