Advertisement
Guest User

Untitled

a guest
Apr 1st, 2015
192
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.28 KB | None | 0 0
  1. GPIO.setup(17, GPIO.OUT) # Configure GPIO so that an LED can be lit
  2.  
  3. try:
  4. GPIO.output(17, True) # Switch on the LED
  5. #Do other stuff....
  6.  
  7. except:
  8. print("exiting")
  9. GPIO.output(17, False) # Switch off the LED
  10. GPIO.cleanup()
  11.  
  12. kill -s INT [pid]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement