mirror of
https://github.com/KevinMidboe/fanController.git
synced 2025-10-29 17:40:22 +00:00
Commented out some import and extra commands.
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
#!/usr/bin/env python3
|
#!/usr/bin/env python3
|
||||||
import CHIP_IO.GPIO as GPIO #import the GPIO library
|
# import CHIP_IO.GPIO as GPIO #import the GPIO library
|
||||||
import sqlite3
|
import sqlite3
|
||||||
from sys import argv
|
from sys import argv
|
||||||
|
|
||||||
@@ -27,24 +27,26 @@ def getFanstate():
|
|||||||
def turnFanON():
|
def turnFanON():
|
||||||
if not getFanstate():
|
if not getFanstate():
|
||||||
updateFanstate(1)
|
updateFanstate(1)
|
||||||
GPIO.setup("CSID0", GPIO.OUT) #set CSID0 as an output
|
# GPIO.setup("CSID0", GPIO.OUT) #set CSID0 as an output
|
||||||
GPIO.output("CSID0", GPIO.HIGH) #set CSID0 (Relay) HIGH (On)
|
# GPIO.output("CSID0", GPIO.HIGH) #set CSID0 (Relay) HIGH (On)
|
||||||
return '1'
|
return '1'
|
||||||
|
|
||||||
def turnFanOFF():
|
def turnFanOFF():
|
||||||
if getFanstate():
|
if getFanstate():
|
||||||
updateFanstate(0)
|
updateFanstate(0)
|
||||||
GPIO.setup("CSID0", GPIO.OUT) #set CSID0 as an output
|
# GPIO.setup("CSID0", GPIO.OUT) #set CSID0 as an output
|
||||||
GPIO.output("CSID0", GPIO.LOW) #set CSID0 (Relay) LOW (Off)
|
# GPIO.output("CSID0", GPIO.LOW) #set CSID0 (Relay) LOW (Off)
|
||||||
return '1'
|
return '1'
|
||||||
|
|
||||||
def reloadFanstate():
|
def reloadFanstate():
|
||||||
GPIO.setup("CSID0", GPIO.OUT) #set CSID0 as an output
|
GPIO.setup("CSID0", GPIO.OUT) #set CSID0 as an output
|
||||||
|
|
||||||
|
'''
|
||||||
if getFanstate():
|
if getFanstate():
|
||||||
GPIO.output("CSID0", GPIO.HIGH) #set CSID0 (Relay) HIGH (On)
|
GPIO.output("CSID0", GPIO.HIGH) #set CSID0 (Relay) HIGH (On)
|
||||||
else:
|
else:
|
||||||
GPIO.output("CSID0", GPIO.LOW) #set CSID0 (Relay) LOW (Off)
|
GPIO.output("CSID0", GPIO.LOW) #set CSID0 (Relay) LOW (Off)
|
||||||
|
'''
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
arg = argv[-1]
|
arg = argv[-1]
|
||||||
|
|||||||
Binary file not shown.
Reference in New Issue
Block a user