I am not convinced that helps with the numerous 'when button pushed ...' programs I have in the form -Any command that can be provided to the gpioset interactive mode will work and can be sent by any process with access to the pipe.
Code:
from gpiozero import Buttonfrom signal import pauseimport sysdef ButtonPushed(): """do something""" button = Button(int(sys.argv[1]))button.when_pressed = ButtonPushedpause()
The way I see it is that the 'gpizero' library I am using needs to change to allow what I am doing, have been doing for all those years, but that's apparently not easy because 'libgpiod', 'uAPI', or whatever, doesn't make that easy.
Presumably 'gpiozero' needs updating to use access some kind of daemon rather than directly interfacing to 'libgpiod', 'uAPI', or whatever, but such a daemon doesn't currently exist. Whether that daemon is created by Raspberry Pi or someone else I don't really care, though it still seems better to me to have 'Linux' provide that daemon so Raspberry Pi doesn't have to.
If that daemon is being worked on that's great, and the sooner it arrives the better, but it's been a long time coming and IMO should have been available when Raspberry Pi and others moved to using 'libgpiod'. I don't so much care about how blame is apportioned for what we currently have, only that it gets resolved.
Statistics: Posted by hippy — Thu Oct 17, 2024 11:29 am