flask gpio test
This commit is contained in:
parent
3c40b1fe61
commit
49f47d5410
@ -27,7 +27,7 @@ def main():
|
||||
for pin in pins:
|
||||
pins[pin]['state'] = GPIO.input(pin)
|
||||
for pin in pins_in:
|
||||
pins_in[pin]['state'] = GPIO.input(pin)
|
||||
pins_in[pin]['state'] = GPIO.input(pins_in[pin]['nr'])
|
||||
|
||||
# Put the pin dictionary into the template data dictionary:
|
||||
templateData = {
|
||||
@ -58,7 +58,7 @@ def action(changePin, action):
|
||||
for pin in pins:
|
||||
pins[pin]['state'] = GPIO.input(pin)
|
||||
for pin in pins_in:
|
||||
pins_in[pin]['state'] = GPIO.input(pin)
|
||||
pins_in[pin]['state'] = GPIO.input(pins_in[pin]['nr'])
|
||||
|
||||
# Along with the pin dictionary, put the message into the template data dictionary:
|
||||
templateData = {
|
||||
|
Loading…
x
Reference in New Issue
Block a user