Status der Schalter u. Relais geändert

This commit is contained in:
Bernd Reuther 2021-10-17 07:32:38 +02:00
parent 736118a328
commit 64f93b1a76
2 changed files with 3 additions and 3 deletions

View File

@ -135,7 +135,7 @@ class motor():
def eichen(self): def eichen(self):
if self.aktiv == 0: if self.aktiv == 0:
if pi.read(self.endschalter) == 0: if pi.read(self.endschalter) == 0:
self.__vorwaerts(10, 1) self.__vorwaerts(8, 1)
self.__rueckwaerts(self.schritte_max, 1) self.__rueckwaerts(self.schritte_max, 1)
self.pos = 0 self.pos = 0

View File

@ -12,7 +12,7 @@
<h1>RPi Web Server</h1> <h1>RPi Web Server</h1>
{% for pin in pins %} {% for pin in pins %}
<h2>{{ pins[pin].name }} <h2>{{ pins[pin].name }}
{% if pins[pin].state == 1 %} {% if pins[pin].state == 0 %}
ist gerade <strong>an</strong></h2><div class="row"><div class="col-md-2"> ist gerade <strong>an</strong></h2><div class="row"><div class="col-md-2">
<a href="/{{pin}}/off" class="btn btn-block btn-lg btn-default" role="button">Turn off</a></div></div> <a href="/{{pin}}/off" class="btn btn-block btn-lg btn-default" role="button">Turn off</a></div></div>
{% else %} {% else %}
@ -22,7 +22,7 @@
{% endfor %} {% endfor %}
{% 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 == 1 %} {% if pins_in[pin].state == 0 %}
ist gerade <strong>an</strong></h3> ist gerade <strong>an</strong></h3>
{% else %} {% else %}
ist gerade <strong>aus</strong></h3> ist gerade <strong>aus</strong></h3>