File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change 1616
1717for i in btns :
1818 GPIO .setup (i ,GPIO .OUT )
19- GPIO .output (i ,True )
19+ GPIO .output (i ,False )
2020
2121@app .route ('/' )
2222def index ():
@@ -26,13 +26,13 @@ def index():
2626@app .route ('/checked/' , methods = ['POST' ])
2727def 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' ])
3333def 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
3838try :
@@ -44,4 +44,4 @@ def unchecked():
4444
4545finally :
4646 for i in btns :
47- GPIO .output (i ,True )
47+ GPIO .output (i ,False )
You can’t perform that action at this time.
0 commit comments