klasse motor test

This commit is contained in:
Bernd Reuther 2021-03-04 10:58:44 +01:00
parent cf0846244f
commit 2adf0e01c5
2 changed files with 4 additions and 2 deletions

View File

@ -13,6 +13,8 @@ for pin in pins_out:
for pin in pins_in: for pin in pins_in:
GPIO.setup(pins_in[pin]['nr'], GPIO.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('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) m1 = motor('kippen', m2_a1, m2_b1, m2_a2, m2_b2, m2_t1, m2_t2, m2_te, m2_es, 1)

View File

@ -23,9 +23,9 @@
{% for pin in pins_in %} {% for pin in pins_in %}
<h3>{{ pins_in[pin].name }} <h3>{{ pins_in[pin].name }}
{% if pins_in[pin].state == true %} {% if pins_in[pin].state == true %}
ist gerade <strong>an</strong></h3><div class="row"><div class="col-md-2"> ist gerade <strong>an</strong></h3>
{% else %} {% else %}
ist gerade <strong>aus</strong></h3><div class="row"><div class="col-md-2"> ist gerade <strong>aus</strong></h3>
{% endif %} {% endif %}
{% endfor %} {% endfor %}
</body> </body>