Skip to content

Commit ffecece

Browse files
authored
Update auto_home.py
1 parent f8a3f2a commit ffecece

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

auto_home.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616

1717
for i in btns:
1818
GPIO.setup(i,GPIO.OUT)
19-
GPIO.output(i,True)
19+
GPIO.output(i,False)
2020

2121
@app.route('/')
2222
def index():
@@ -26,13 +26,13 @@ def index():
2626
@app.route('/checked/', methods=['POST'])
2727
def checked():
2828
btn_id = int(request.form['id'])
29-
GPIO.output(btn_id,False)
29+
GPIO.output(btn_id,True)
3030
return btns[btn_id] +" turned on successfully"
3131

3232
@app.route('/unchecked/', methods=['POST'])
3333
def unchecked():
3434
btn_id = int(request.form['id'])
35-
GPIO.output(btn_id,True)
35+
GPIO.output(btn_id,False)
3636
return btns[btn_id] +" turned off successfully"
3737

3838
try:
@@ -44,4 +44,4 @@ def unchecked():
4444

4545
finally:
4646
for i in btns:
47-
GPIO.output(i,True)
47+
GPIO.output(i,False)

0 commit comments

Comments
 (0)