Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ########################################
- # file: main.py
- # project: Timers
- # created: 2014-12-02 20:46:12.843231
- ########################################
- pinMode(13, OUTPUT)
- pinMode(21, OUTPUT)
- def red():
- while True:
- digitalWrite(13, 0)
- sleep(500)
- digitalWrite(13, 1)
- sleep(500)
- def yellow():
- while True:
- digitalWrite(21, 0)
- sleep(250)
- digitalWrite(21, 1)
- sleep(250)
- thread(red)
- thread(yellow)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement