diff --git a/pyscripts/led-csid0-off.py b/pyscripts/led-csid0-off.py new file mode 100755 index 0000000..10c34e6 --- /dev/null +++ b/pyscripts/led-csid0-off.py @@ -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() diff --git a/pyscripts/led-csid0-on.py b/pyscripts/led-csid0-on.py new file mode 100755 index 0000000..b4186ab --- /dev/null +++ b/pyscripts/led-csid0-on.py @@ -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() diff --git a/pyscripts/state.txt b/pyscripts/state.txt new file mode 100644 index 0000000..cfb931e --- /dev/null +++ b/pyscripts/state.txt @@ -0,0 +1 @@ +off