from acab import set from acab import update import time import sys t = .03 n = 300 lamp = int(sys.argv[1], 16) #for i in range(0,3): while 1: set(lamp, 255, 0, 0) update() time.sleep(t) set(lamp, 0, 255, 0) update() time.sleep(t) set(lamp, 0, 0, 255) update() time.sleep(t) set(lamp, 255, 255, 255) update() time.sleep(t) #raw_input() lamp += 1 print hex(lamp) if lamp == 256: break
import time from acab import set import random t = 0.1 n = 300 while 1: j = 0x27 for i in range(0x10, 0x28): set(i, 255, 0, 0) set(j, 0, 255, 0) time.sleep(t) j = i
from acab import set from acab import update import time import sys t = 0.3 n = 300 lamp = int(sys.argv[1], 16) # for i in range(0,3): while 1: set(lamp, 255, 0, 0) update() time.sleep(t) set(lamp, 0, 255, 0) update() time.sleep(t) set(lamp, 0, 0, 255) update() time.sleep(t) set(lamp, 255, 255, 255) update() time.sleep(t)
import time from acab import set import random def recolor(): r = int(random.random()*255) g = int(random.random()*255) b = int(random.random()*255) cr = 255-r cg = 255-g cb = 255-b t = 0.05 n = 300 while 1: r = int(random.random()*255) g = int(random.random()*255) b = int(random.random()*255) for i in range(0x10,0x28): set(i,r,g,b) time.sleep(t) r = int(random.random()*255) g = int(random.random()*255) b = int(random.random()*255) for i in range(0x28,0x10,-1): set(i,r,g,b) time.sleep(t)
import time from acab import set import random def recolor(): r = int(random.random() * 255) g = int(random.random() * 255) b = int(random.random() * 255) cr = 255 - r cg = 255 - g cb = 255 - b t = 0.05 n = 300 while 1: r = int(random.random() * 255) g = int(random.random() * 255) b = int(random.random() * 255) for i in range(0x10, 0x28): set(i, r, g, b) time.sleep(t) r = int(random.random() * 255) g = int(random.random() * 255) b = int(random.random() * 255) for i in range(0x28, 0x10, -1): set(i, r, g, b) time.sleep(t)
import time from acab import set import random t = 0.1 n = 300 while 1: j = 0x27 for i in range(0x10,0x28): set(i,255,0,0) set(j,0,255,0) time.sleep(t) j = i