From 2adf0e01c5b15acb61b1ad7628852552d5ad4643 Mon Sep 17 00:00:00 2001 From: Bernd Reuther Date: Thu, 4 Mar 2021 10:58:44 +0100 Subject: [PATCH] klasse motor test --- kamera_server.py | 2 ++ templates/main.html | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/kamera_server.py b/kamera_server.py index bebf43e..f5e0571 100644 --- a/kamera_server.py +++ b/kamera_server.py @@ -13,6 +13,8 @@ for pin in pins_out: for pin in pins_in: GPIO.setup(pins_in[pin]['nr'], GPIO.IN) +GPIO.output(pins_out['kamera']['nr'], GPIO.HIGH) + m1 = motor('drehen', m1_a1, m1_b1, m1_a2, m1_b2, m1_t1, m1_t2, m1_te, m1_es, 0) m1 = motor('kippen', m2_a1, m2_b1, m2_a2, m2_b2, m2_t1, m2_t2, m2_te, m2_es, 1) diff --git a/templates/main.html b/templates/main.html index 4964e34..a7e83dd 100644 --- a/templates/main.html +++ b/templates/main.html @@ -23,9 +23,9 @@ {% for pin in pins_in %}

{{ pins_in[pin].name }} {% if pins_in[pin].state == true %} - ist gerade an

+ ist gerade an {% else %} - ist gerade aus
+ ist gerade aus {% endif %} {% endfor %}