on/off buttons geändert
This commit is contained in:
parent
bfdf8e9393
commit
6e5e394797
@ -67,12 +67,12 @@ def action(changePin, action):
|
||||
if action == "on":
|
||||
# Set the pin high:
|
||||
#GPIO.output(changePin, GPIO.HIGH)
|
||||
pi.write(changePin, 1)
|
||||
pi.write(changePin, 0)
|
||||
# Save the status message to be passed into the template:
|
||||
message = "Turned " + deviceName + " on."
|
||||
if action == "off":
|
||||
#GPIO.output(changePin, GPIO.LOW)
|
||||
pi.write(changePin, GPIO.LOW)
|
||||
pi.write(changePin, 1)
|
||||
message = "Turned " + deviceName + " off."
|
||||
|
||||
# For each pin, read the pin state and store it in the pins dictionary:
|
||||
|
Loading…
x
Reference in New Issue
Block a user