Пример #1
0
from PyDMXControl.controllers import uDMXController as Controller

# Create our controller
dmx = Controller()

# Load fixture in from json
dmx.load_json_config('tests/json/load.json')

# Check fixture was loaded
dmx.all_locate()

# Save fixture back to json
print(dmx.save_json_config('tests/json/save.json'))

# Start console debug for testing
dmx.debug_control()

# Close the controller once we're done
dmx.sleep_till_enter()
dmx.close()
Пример #2
0
from datetime import datetime

from PyDMXControl import Colors
from PyDMXControl.controllers import uDMXController as Controller
from PyDMXControl.profiles.Eyourlife import Small_Flat_Par
from PyDMXControl.profiles.Stairville import LED_Par_10mm, LED_Par_36

# This is my home setup, which also acts as a great demo of some of what this library is capable of doing.
# See the tests directory for other recent/new features that I've possibly been working on.

# Create our controller
dmx = Controller()

# Load some fixtures from JSON
dmx.load_json_config('tests/json/home.json')

"""
dmx.add_fixture(LED_Par_10mm, name="Flood")

dmx.add_fixture(LED_Par_36, name="S1 Art Left")
dmx.add_fixture(LED_Par_36, name="S2 Board")
dmx.add_fixture(LED_Par_36, name="S3 Art Right")
dmx.add_fixture(LED_Par_36, name="S4 Books")

dmx.add_fixture(Small_Flat_Par, name="F1 Desk Right")
dmx.add_fixture(Small_Flat_Par, name="F2 Desk Left")
"""

# Define all the methods the callback will use
custom_blue = [0, 16, 255]
custom_white = [255, 140, 70]