Explorar o código

Simple OLA interface for an arbitrary number of channels -- set and forget

Zachary Kotlarek %!s(int64=14) %!d(string=hai) anos
pai
achega
ac1fdab46a
Modificáronse 1 ficheiros con 16 adicións e 0 borrados
  1. 16 0
      dmx/setChannels.py

+ 16 - 0
dmx/setChannels.py

@@ -0,0 +1,16 @@
+#!/usr/bin/python
+import sys
+import array
+from ola.ClientWrapper import ClientWrapper
+
+def DmxSent(state):
+  wrapper.Stop()
+
+universe = 0
+data = array.array('B')
+for i in range(1, len(sys.argv)):
+   data.append(int(sys.argv[i]))
+wrapper = ClientWrapper()
+client = wrapper.Client()
+client.SendDmx(universe, data, DmxSent)
+wrapper.Run()