summaryrefslogtreecommitdiffstats
path: root/bridge.py
diff options
context:
space:
mode:
authorRaymond Hogenson <rayhogenson@openmailbox.org>2016-09-27 23:12:49 -0400
committerRaymond Hogenson <rayhogenson@openmailbox.org>2016-09-27 23:12:49 -0400
commited0c631003b556e2e84f21bf4ebbf03891763641 (patch)
treeced193b8214d8c1bf7f1e8b4dd1d16d3c3e104d4 /bridge.py
parent7dced453f7b53146a730ef77df30f152247dafe1 (diff)
parent6e265cfa5002a5667681733eae08357f2b9695e5 (diff)
downloadbridge-ed0c631003b556e2e84f21bf4ebbf03891763641.tar.zst
Merge branch 'master' of github.com:rayhogenson/bridge
Diffstat (limited to 'bridge.py')
-rw-r--r--bridge.py15
1 files changed, 12 insertions, 3 deletions
diff --git a/bridge.py b/bridge.py
index 76f3043..7271db8 100644
--- a/bridge.py
+++ b/bridge.py
@@ -1,11 +1,17 @@
-#!/usr/bin/python
+#!/usr/bin/python2
"""Simple demo of oscillating colors."""
from __future__ import division, unicode_literals
import color
import constants
+from DummyRig import DummyRig
import fish_render
-import lumiversepython
import time
+try:
+ import lumiversepython
+except ImportError:
+ have_lumiversepython = False
+else:
+ have_lumiversepython = True
def get_all_lights(rig):
"""Return a list of all panels."""
@@ -28,7 +34,10 @@ def demo(lights, rig):
def main():
"""Run show."""
- rig = lumiversepython.Rig('/home/teacher/Lumiverse/PBridge.rig.json')
+ if have_lumiversepython:
+ rig = lumiversepython.Rig('/home/teacher/Lumiverse/PBridge.rig.json')
+ else:
+ rig = DummyRig(200, 2)
rig.init()
lights = get_all_lights(rig)
demo(lights, rig)