gpio-python-example/gpio.py

13 lines
260 B
Python

#!/usr/bin/python3
GPIO60 = "/sys/class/gpio/gpio60/"
def writeVal(path, direction, value):
fop = open(path + "direction", "w")
fop.write(direction)
fop.close()
fov = open(path + "value", "w")
fov.write(value)
fov.close()
return