does it work on pi3b?
pmitham opened this issue · comments
Tony,
I've downloaded all of your shutdown scripts and none of them work on a pi3b running raspbian jessi.
Have you been able to get this to work? when I try to run I ge tthe following output:
/shutdown-led-simple.py
Traceback (most recent call last):
File "./shutdown-led-simple.py", line 22, in
btn = Button(offGPIO, hold_time=holdTime)
File "/usr/lib/python3/dist-packages/gpiozero/devices.py", line 95, in call
self = super(GPIOMeta, cls).call(*args, **kwargs)
File "/usr/lib/python3/dist-packages/gpiozero/input_devices.py", line 292, in init
pin, pull_up, bounce_time, pin_factory=pin_factory
File "/usr/lib/python3/dist-packages/gpiozero/mixins.py", line 338, in init
super(HoldMixin, self).init(*args, **kwargs)
File "/usr/lib/python3/dist-packages/gpiozero/input_devices.py", line 95, in init
self.pin.when_changed = self._fire_events
File "/usr/lib/python3/dist-packages/gpiozero/pins/init.py", line 388, in
lambda self, value: self._set_when_changed(value),
File "/usr/lib/python3/dist-packages/gpiozero/pins/pi.py", line 289, in _set_when_changed
self._enable_event_detect()
File "/usr/lib/python3/dist-packages/gpiozero/pins/rpigpio.py", line 219, in _enable_event_detect
bouncetime=self._bounce)
RuntimeError: Failed to add edge detection
thanks
Try running it as root and see if it works then.
It seems that it's either a permissions problem or a version problem. These might have a clue to your problem:
https://www.raspberrypi.org/forums/viewtopic.php?f=32&t=125803
https://www.raspberrypi.org/forums/viewtopic.php?f=32&t=129015&p=874227#p874227
gpiozero/gpiozero#438
https://stackoverflow.com/questions/41679547/failed-to-add-edge-detection-raspberry-pi-3-gpio#45519515
Got it working had to move the line in rc.local so that its above the exit0 statement
ah. Glad it's working now