From 49f47d541095627017245902fe6e3516550cf5fa Mon Sep 17 00:00:00 2001 From: Bernd Reuther Date: Wed, 3 Mar 2021 21:01:37 +0100 Subject: [PATCH] flask gpio test --- kamera_server.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/kamera_server.py b/kamera_server.py index 11339f1..735bcfa 100644 --- a/kamera_server.py +++ b/kamera_server.py @@ -27,7 +27,7 @@ def main(): for pin in pins: pins[pin]['state'] = GPIO.input(pin) for pin in pins_in: - pins_in[pin]['state'] = GPIO.input(pin) + pins_in[pin]['state'] = GPIO.input(pins_in[pin]['nr']) # Put the pin dictionary into the template data dictionary: templateData = { @@ -58,7 +58,7 @@ def action(changePin, action): for pin in pins: pins[pin]['state'] = GPIO.input(pin) for pin in pins_in: - pins_in[pin]['state'] = GPIO.input(pin) + pins_in[pin]['state'] = GPIO.input(pins_in[pin]['nr']) # Along with the pin dictionary, put the message into the template data dictionary: templateData = {