Mercurial > code > home > repos > light9
changeset 877:b703f6264bb6
another dmx tester
Ignore-this: 52262d3c32ac4b01009d34e33afeb814
author | Drew Perttula <drewp@bigasterisk.com> |
---|---|
date | Fri, 07 Jun 2013 21:30:19 +0000 |
parents | e263c4bd73f9 |
children | 71e9f35dd0e1 |
files | bin/dmx_color_test.py |
diffstat | 1 files changed, 19 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/bin/dmx_color_test.py Fri Jun 07 21:30:19 2013 +0000 @@ -0,0 +1,19 @@ +#!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()