Created
July 28, 2012 20:16
-
-
Save glynrob/3194642 to your computer and use it in GitHub Desktop.
Loop through all colours in an array
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python | |
import subprocess | |
import time | |
import usblamp | |
checkTime = 1 | |
arr = ("white", "yellow", "red", "blue", "green") | |
for i in arr: | |
print i | |
usblamp.switchTo(i) | |
time.sleep(checkTime) | |
print 'Code exited' | |
usblamp.switchTo("off") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment