mirror of
https://github.com/KevinMidboe/fanController.git
synced 2025-10-29 09:30:23 +00:00
Moved python files to 'pyscript' folder
This commit is contained in:
9
pyscripts/led-csid0-off.py
Executable file
9
pyscripts/led-csid0-off.py
Executable file
@@ -0,0 +1,9 @@
|
||||
#!/usr/bin/env python3
|
||||
import CHIP_IO.GPIO as GPIO #import the GPIO library
|
||||
|
||||
GPIO.setup("CSID0", GPIO.OUT) #set CSID0 as an output
|
||||
GPIO.output("CSID0", GPIO.LOW) #set CSID0 (LED) LOW (Off)
|
||||
|
||||
f = open( 'public/state.txt', 'w' )
|
||||
f.write('off')
|
||||
f.close()
|
||||
9
pyscripts/led-csid0-on.py
Executable file
9
pyscripts/led-csid0-on.py
Executable file
@@ -0,0 +1,9 @@
|
||||
#!/usr/bin/env python3
|
||||
import CHIP_IO.GPIO as GPIO #import the GPIO library
|
||||
|
||||
GPIO.setup("CSID0", GPIO.OUT) #set CSID0 as an output
|
||||
GPIO.output("CSID0", GPIO.HIGH) #set CSID0 (LED) HIGH (On)
|
||||
|
||||
f = open( 'public/state.txt', 'w' )
|
||||
f.write('on')
|
||||
f.close()
|
||||
1
pyscripts/state.txt
Normal file
1
pyscripts/state.txt
Normal file
@@ -0,0 +1 @@
|
||||
off
|
||||
Reference in New Issue
Block a user