Changeset - b703f6264bb6
[Not reviewed]
default
0 0 1
Drew Perttula - 12 years ago 2013-06-07 21:30:19
drewp@bigasterisk.com
another dmx tester
Ignore-this: 52262d3c32ac4b01009d34e33afeb814
1 file changed with 19 insertions and 0 deletions:
0 comments (0 inline, 0 general)
bin/dmx_color_test.py
Show inline comments
 
new file 100644
 
#!bin/python
 
from run_local import log
 
import colorsys, time, logging
 
from light9 import dmxclient
 
from twisted.internet import reactor, task
 

	
 
log.setLevel(logging.INFO)
 
firstDmxChannel = 10
 

	
 
def step():
 
    hue = (time.time() * .2) % 1.0
 
    r, g, b = colorsys.hsv_to_rgb(hue, 1, 1)
 
    chans = [r, g, b]
 
    log.info(chans)
 
    dmxclient.outputlevels([0] * (firstDmxChannel - 1) + chans, twisted=True)
 

	
 

	
 
task.LoopingCall(step).start(.05)
 
reactor.run()
0 comments (0 inline, 0 general)