The edge detection problem is because the GPIO sysfs interface has been removed from recent kernels, and many libraries used that for edge detection.
e.g. button_4.py is one example that uses event handlers.
Buttons can also support debounce periods by defining a bounce_time when you create the button.
Stop killing trees and try reading the docs, code and examples in the source tree - it is free, less dated and more likely to be correct. It is the definitive reference.The question still remains though, what is the gpiozero equivalent to:I sacrificed more trees to purchase the 'Simple Electronics with GPIOZERO' a while ago without realising the significance but there is no mention in there of detecting events, unless it is known as something completely different.Code:
GPIO.add_event_detect(10,GPIO.FALLING, calback=fallingpulseLED, bouncetime = 100)GPIO.add_event_detect(14,GPIO.FALLING, calback=fallingpulseLED, bouncetime = 100)
e.g. button_4.py is one example that uses event handlers.
Buttons can also support debounce periods by defining a bounce_time when you create the button.
Statistics: Posted by warthog618 — Mon Jun 03, 2024 1:08 am