Ejemplo n.º 1
0
 def __init__(self, panel=dmx.getDefaultPanel()) :
     self.panel = panel
     self.running = False
Ejemplo n.º 2
0
#!/usr/bin/python
import dmx
import psyco
import sys
psyco.full()

color = [float(x) for x in sys.argv[1:]]

if __name__=="__main__" :
    a = dmx.getDefaultPanel()
    for row in a.lights:
        for light in row:
            light.setrgb(*color)
    a.output()
Ejemplo n.º 3
0
        minx = [1000000 for i in range(0, charset[1])]
        maxx = [-1 for i in range(0, charset[1])]
        for elt in CHARS[charset][char] :
            minx[elt[1]] = min(minx[elt[1]], elt[0])
            maxx[elt[1]] = max(maxx[elt[1]], elt[0])
            if not KERNING.has_key(charset) :
                KERNING[charset] = dict()
            KERNING[charset][char] = (minx, maxx)
            if not WIDTH.has_key(charset) :
                WIDTH[charset] = dict()
            WIDTH[charset][char] = max(maxx) - min(minx)
            if WIDTH[charset][char] <= 0 :
                WIDTH[charset][char] = 0
                KERNING[charset][char] = ([0 for i in range(0, charset[1])],
                                          [0 for i in range(0, charset[1])])
     

def flashString(panel, string, fps=20) :
    while True :
        for char in string :
            write(panel, str(char), size=(6,7), color=(0.3,0.7,0), scale=2)
            panel.outputAndWait(fps)
       
if __name__ == "__main__" :
    import dmx
    d = dmx.getDefaultPanel()
    #flashString(d, "LEMONADE!  ", 5)
    #write(dmx.getDefaultPanel(), "lemonade! ! ! !", size=(6,7), show=True, color=(0.3,0.7,0))
    scroll(dmx.getDefaultPanel(), "Lemonade!!!!!!!!!!!!!!!!!!!!!!", size=(6,7), color=(0.3,0.7,0), fps=20, scale=2)
    #write(d, "21:10:50", show=True, size=(6,7))