Advertisement
edofhell

Push button single

Feb 14th, 2016
94
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.20 KB | None | 0 0
  1. import RPi.GPIO as GPIO
  2. import os
  3.  
  4. knapPin = 25
  5.  
  6. GPIO.setmode(GPIO.BCM)
  7. GPIO.setup(knapPin,GPIO.IN)
  8.  
  9. while True:
  10. if (GPIO.input(knapPin)):
  11. os.system(“python /home/pi/bin/button/knap1.py”)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement