Advertisement
edofhell

Flip/flop python

Feb 14th, 2016
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.18 KB | None | 0 0
  1. #!/usr/bin/env python
  2. import RPi.GPIO as GPIO
  3. import os
  4.  
  5. GPIO.setmode(GPIO.BCM)
  6. ledState = False
  7. GPIO.setup(7,GPIO.OUT)
  8.  
  9. ledState = not ledState
  10. GPIO.output(7, not GPIO.input(7))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement