Commit 0722ae0e authored by Christian Wander's avatar Christian Wander
Browse files

initial commit

parents
import sacn
import time
count = 144
def main():
print(">> Hello, doing fancy python stuff.")
universe = 1;
sender = sacn.sACNsender()
sender.start()
sender.activate_output(universe)
# sender[1].multicast = True
sender[universe].destination = "192.168.178.37"
pink = (255, 0, 255)
lightblue = (0, 255, 255)
blue = (0, 0, 255)
# mode 4 Multiple RGB ('led0 red', 'led0 green', 'led0 blue', 'led1 red', ...)
# sender[universe].dmx_data = (255, 0, 255, 0, 255, 255, 0, 0, 255) ## some test DMX data
# sender[universe].dmx_data = pink + lightblue + blue
sender[universe].dmx_data = gimme(blue)
# pink = (128, 128, 0, 128)
# sender[universe].dmx_data = (128, 128, 128, 0)
# sender[universe].dmx_data = (5, 6, 7, 8)
time.sleep(10)
## stopping the sender?!
sender.stop()
def gimme(color):
result = [0] * count * 3
i = 0;
while i <= count * 3 -3:
result[i] = color[0]
result[i+1] = color[1]
result[i+2] = color[2]
i = i+3
return result;
if __name__ == "__main__":
main()
\ No newline at end of file
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment