You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

11 lines
242 B

4 months ago
  1. import sys
  2. GPIO="/sys/class/gpio/gpio11"
  3. def write():
  4. fo = open(GPIO + "/direction", "w")
  5. fo.write("out")
  6. fo = open(GPIO + "/value", "w")
  7. fo.write("1")
  8. fo = open(GPIO + "/value", "r")
  9. read = fo.read()
  10. print(read)