Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def pressed(channel):
- press = 1
- times = time.time()
- io.add_event_detect(pin, io.RISING, callback = released, bouncetime = 200)
- if time.time() - times = 3:
- print "You have held the button for 3 seconds"
- elif time.time() - times = 5
- print "You have held the button for 5 seconds"
- elif time.time() - timed = 6:
- print "You can let go now"
- File "shutdown.py", line 43
- while press == 1:
- ^
- SyntaxError: invalid syntax
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement