From 8ba00075f016803c25339d6d9b80832c4b5d09d6 Mon Sep 17 00:00:00 2001 From: Bernd Reuther Date: Wed, 3 Mar 2021 21:46:06 +0100 Subject: [PATCH] gpio pwm init --- kamera_server.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/kamera_server.py b/kamera_server.py index 613d4fc..46c6047 100644 --- a/kamera_server.py +++ b/kamera_server.py @@ -30,13 +30,13 @@ for key, value in pins_pwm.items(): def main(): # For each pin, read the pin state and store it in the pins dictionary: for pin in pins_out: - pins[pin]['state'] = GPIO.input(pins_out[pin]['nr']) + pins_out[pin]['state'] = GPIO.input(pins_out[pin]['nr']) for pin in pins_in: pins_in[pin]['state'] = GPIO.input(pins_in[pin]['nr']) # Put the pin dictionary into the template data dictionary: templateData = { - 'pins' : pins, + 'pins' : pins_out, 'pins_in' : pins_in } # Pass the template data into the template main.html and return it to the user @@ -67,7 +67,7 @@ def action(changePin, action): # Along with the pin dictionary, put the message into the template data dictionary: templateData = { - 'pins' : pins, + 'pins' : pins_out, 'pins_in' : pins_in }