-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathring_script.py
More file actions
45 lines (38 loc) · 1004 Bytes
/
Copy pathring_script.py
File metadata and controls
45 lines (38 loc) · 1004 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
import asyncio
from pyartnet import ArtNetNode
from ring_helper import (
ALL_UNIVERSES,
OUTER_UNIVERSE,
A_INNER,
A_OUTER,
B_INNER,
B_OUTER,
C_INNER,
C_OUTER,
RING_CONTROLLER_IP
)
from artnet_helper import RGBW, Fixture, assign_fixtures
MAGENTA = RGBW(237, 4, 249, 0)
OFF = RGBW(0, 0, 0, 0)
CYAN = RGBW(0, 200, 255, 0)
BLUE = RGBW(0, 0, 255, 0)
ORANGE = RGBW(100, 11, 0, 0)
GREEN = RGBW(14, 250, 2, 0)
YELLOW = RGBW(212, 249, 2, 0)
RED = RGBW(255, 0, 0, 0)
PURPLE = RGBW(134, 2, 249, 0)
TIME = 1000
async def main():
async with ArtNetNode.create(RING_CONTROLLER_IP, 6454) as node:
fixtures = [
Fixture(A_INNER, MAGENTA),
Fixture(A_OUTER, CYAN),
Fixture(B_INNER, PURPLE),
Fixture(B_OUTER, BLUE),
Fixture(C_INNER, MAGENTA),
Fixture(C_OUTER, BLUE)
]
await asyncio.gather(
assign_fixtures(node, fixtures, TIME)
)
asyncio.run(main())