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 }