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.

13 lines
221 B

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