Advertisement
Guest User

Untitled

a guest
Jan 23rd, 2018
56
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.37 KB | None | 0 0
  1. import RPi.GPIO as GPIO
  2. import time
  3. import subprocess
  4. GPIO.setmode(GPIO.BCM)
  5. GPIO.setup(23, GPIO.IN)
  6. GPIO.setup(24, GPIO.IN)
  7. GPIO.setup(25, GPIO.IN)
  8.  
  9. while True:
  10. if GPIO.input(24) == 0:
  11. subprocess.call("/home/pi/script/mute_on_ch1.sh", shell=True)
  12. else:
  13. # Einschalten
  14. subprocess.call("/home/pi/script/mute_off_ch1.sh", shell=True)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement