RPi-Jukebox-RFID icon indicating copy to clipboard operation
RPi-Jukebox-RFID copied to clipboard

Default GPIO Button configuration conflicts with reserved GPIO pins

Open hgschwibbe opened this issue 3 years ago • 0 comments

Bug

What I did

I installed the Jukebox on an Raspberry Pi 3 using the Waveshare PN532 NFC HAT over I2C with a Shutdown button.

What happened

After wiring the Shutdown button on the default PINS from gpio_settings.ini, the NFC HAT was going out of work.

I expected this to happen

I expected exactly this because the default configuration uses the I2C data wire at GPIO3 (SCL PC).

Further information that might help

The default gpio_settings.ini should not use GPIO pins which are reserved for protocols like I2C, UART, or SPI.

As you can see in the Pin numbering on the RPi, the green PINs are free to use, others are reserved for something.

Here is my working example that I am currently using:

[PrevNextControl]
enabled : True
type : TwoButtonControl
pin1 : 5
pin2 : 13
functioncall1 : functionCallPlayerPrev
functioncall2 : functionCallPlayerNext
functioncalltwobuttons : None
hold_time : 0.3
pull_up_down : pull_up
hold_mode : None

[PlayPause]
enabled : True
type : Button
pin : 21
hold_time : 0.3
functioncall : functionCallPlayerPause
pull_up_down : pull_up

[Shutdown]
enabled : True
type : Button
pin : 27
hold_time : 2
functioncall : functionCallShutdown
pull_up_down : pull_up

And there are my thoughts on my custom configuration: I put the Shutdown button on GPIO27 because of the Ground on the opposite and a 3.3V power supply next to it. I did this because I have a button with an LED light inside where the LED cables have two separate cables and plugs for + and -. But the on/off toggle is one plug with two cables connected.

Hardware

RaspberryPi version

3 B+

RFID Reader

Waveshare PN532 NFC HAT

hgschwibbe avatar Jan 29 '22 10:01 hgschwibbe