Commit a9915fb5 authored by Kristian Tan's avatar Kristian Tan

format

parent 100f617f
......@@ -35,6 +35,7 @@ def action(change_pin):
change_pin = int(change_pin)
device_name = pins[change_pin]['name']
print("Input value before change: " + str(GPIO.input(change_pin)))
print("CHANGE PIN: " + change_pin)
# if action == "on":
# GPIO.output(change_pin, GPIO.HIGH)
......@@ -47,9 +48,9 @@ def action(change_pin):
message = "Turned " + device_name
if GPIO.input(change_pin) == 0:
message += "off."
message += " off."
else:
message += "on."
message += " on."
for pin in pins:
pins[pin]['state'] = GPIO.input(pin)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment