Testing functions
parent
3885c796e3
commit
d7868df8cd
@ -1,12 +1,15 @@
|
|||||||
#!/usr/bin/python3
|
#!/usr/bin/python3
|
||||||
import sys
|
|
||||||
GPIOPATH = "/sys/class/gpio/"
|
|
||||||
|
|
||||||
fo = open(GPIOPATH + "gpio60/direction", "w")
|
GPIO60 = "/sys/class/gpio/gpio60/"
|
||||||
fo.write("out")
|
|
||||||
fo.close()
|
|
||||||
|
|
||||||
fo = open(GPIOPATH + "gpio60/value", "w")
|
def writeVal(path, direction, value):
|
||||||
fo.write("1")
|
fop = open(path + "direction", "w")
|
||||||
fo.close()
|
fop.write(direction)
|
||||||
|
fop.close()
|
||||||
|
fov = open(path + "value", "w")
|
||||||
|
fov.write(value)
|
||||||
|
fov.close()
|
||||||
|
return
|
||||||
|
|
||||||
|
writeVal(GPIO60, "out", "1")
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue