Replies: 3 comments
-
In your config you still use the |
Beta Was this translation helpful? Give feedback.
-
I have uninstalled rpigpio and installed lgpio:
I also tried alternative factories in
... which does not change the behavior at all. When I close the button then it actually plays the song without jittering / oscillation. To my understanding the GPIOs are digital inputs so there should not be a threshold issue. It feels however as if the GPIO would be activated by some noise and a state that should be LOW is sometimes read as HIGH. |
Beta Was this translation helpful? Give feedback.
-
After quite some fiddling around I think I found a way to get it working - although not fully sure if this is how the button is intended to work. I connected the button to pin GPIO_17 and 3V3 (external 1kΩ resistor). When I then modify the gpio.yml like so: pin_factory:
type: lgpio.LGPIOFactory
input_devices:
TogglePlayback:
type: Button
kwargs:
pin: 17
pull_up:
active_state: true
actions:
on_press:
alias: toggle the button works as expected. Note that the pull_up is intentionally set to none to disable it. |
Beta Was this translation helpful? Give feedback.
-
Hi all,
So far I got the phoniebox setup with a RPI HiFi AMP HAT TAS5713 Amplifier Audio Module and a USB RFID reader (after having trouble connecting another one to the GPIO pins).
I removed rpgpio from the venv and replaced it by lgpio (per the advice here). The gpio.yml is pretty simple:
I am using the GPIO headers on the sound board.
When I connect GPIO 17 and Ground directly with a screwdriver the play/pause toggle works as expected.
However as soon as I connect any kind of cable to GPIO 17 (even without connecting it to anything but thin air) the player starts to osciallate between play and pause state.
Any idea where to start the bug hunt? I tried to add a
hold_time
of 0.5 to the button - which did not changed anything.Best regrads
Oli
Beta Was this translation helpful? Give feedback.
All reactions