-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathtest.py
31 lines (29 loc) · 905 Bytes
/
test.py
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
from neopyxel import NeopyxelRelay
import time
from neopyxel.effects import SteadyColor, Fireplace, Raining
from neopyxel.transitions import expand
from neopyxel.backend import ArduinoRelayBackend
import sys
relay = NeopyxelRelay(Backend=ArduinoRelayBackend, debug=True)
relay.add_stripe(30, 4)
relay.add_stripe(30, 5)
relay.add_stripe(30, 6)
ambar = (240, 80, 30)
whiter_ambar = (240, 120, 40)
white = (255, 255, 255)
purple = (255, 0, 255)
fireplace_base = (252, 72, 12)
cyberpunk = (19, 62, 124)
try:
# relay.execute_effect(Fireplace)
relay.execute_effect(SteadyColor,
color=ambar,
StartTransition=expand.FromCenter,
StopTransition=expand.FromBorders)
while True:
time.sleep(1)
except KeyboardInterrupt:
relay.stop_effect()
relay.flush_stripes()
print("Ctrl+C pressed...exit")
sys.exit(1)