view light8/io.py @ 40:f3d65ae17a8f

these are mostly replaced with guys&dolls material (effects were not touched) these are mostly replaced with guys&dolls material (effects were not touched) dance show went to a new dir called Configs/
author drewp
date Sun, 07 Jul 2002 12:17:30 +0000
parents f595fdd4c548
children 032b2b67bc10
line wrap: on
line source

from parport import *

class ParportDMX:
    def __init__(self, dummy=1, dimmers=68):
        self.dummy = dummy
        if not dummy:
            getparport()
    def sendlevels(self, levels):
        if self.dummy: return
        levels = list(levels) + [0]
        # if levels[14] > 0: levels[14] = 100 # non-dim
        outstart()
        for p in range(1, dimmers + 2):
            outbyte(levels[p-1]*255 / 100)