GPIO handle forgotten
This commit is contained in:
1 parent
a0e4b19965
commit
d8b65b0d29
1 file changed
+1
@@ -407,6 +407,7 @@ def setup_gpio():
|
||||
GPIO.setup(gpio_trigger_channel, GPIO.IN, pull_up_down=GPIO.PUD_UP)
|
||||
GPIO.setup(gpio_shutdown_channel, GPIO.IN, pull_up_down=GPIO.PUD_UP)
|
||||
GPIO.add_event_detect(gpio_trigger_channel, GPIO.RISING, callback=handle_gpio, bouncetime=200)
|
||||
GPIO.add_event_detect(gpio_shutdown_channel, GPIO.RISING, callback=handle_gpio, bouncetime=200)
|
||||
else:
|
||||
print("Warning: RPi.GPIO could not be loaded. GPIO disabled.")
|
||||
|
||||
|
||||
Reference in new issue
Block a user