-
Notifications
You must be signed in to change notification settings - Fork 0
/
neopixels.cfg
78 lines (70 loc) · 2.13 KB
/
neopixels.cfg
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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
[gcode_macro STROBE]
gcode:
{% set R1 = 1.0 %}
{% set G1 = 0.14 %}
{% set B1 = 0 %}
{% set R2 = 0 %}
{% set G2 = 0 %}
{% set B2 = 0 %}
{% for i in range(0, 7) %}
{% for led in range(1, 96) %}
SET_LED LED=Enclosure_Lights RED={R1} GREEN={G1} BLUE={B1} INDEX={led}
G4 P60
SET_LED LED=Enclosure_Lights RED={R2} GREEN={G2} BLUE={B2} INDEX={led}
{% endfor %}
{% for led in range(24, 1, -1) %}
SET_LED LED=Enclosure_Lights RED={R1} GREEN={G1} BLUE={B1} INDEX={led}
G4 P60
SET_LED LED=Enclosure_Lights RED={R2} GREEN={G2} BLUE={B2} INDEX={led}
{% endfor %}
{% endfor %}
[gcode_macro RAIN]
variable_led1: 0
variable_led2: 0
variable_led3: 0
variable_led4: 0
variable_led5: 0
gcode:
SET_LED LED=Enclosure_Lights RED=0 GREEN=0 BLUE=0
{% for pos in range(0, 500) %}
{% set led1 = (range(1, 96) | random) %}
SET_LED LED=Enclosure_Lights RED={(range(1, 255) | random) / 255} GREEN={(range(1, 255) | random) / 255} BLUE={(range(1, 255) | random) / 255} INDEX={led1}
G4 P60
SET_LED LED=Enclosure_Lights RED=0 GREEN=0 BLUE=0 INDEX={led1}
{% endfor %}
[gcode_macro RAINBOW]
variable_R1: 0
variable_G1: 0
variable_B1: 0
variable_pos: 0
gcode:
{% for cycke in range(1, 5) %}
{% for pos in range(0, 255) %}
{% if pos < 85 %}
{% set R1 = (255 - pos * 3) / 255 %}
{% set G1 = (pos * 3) / 255 %}
{% set B1 = 0 %};
{% else %}
{% if pos < 170 %}
{% set R1 = 0 %}
{% set G1 = (255 - (pos - 85) * 3) / 255 %}
{% set B1 = (pos - 85) * 3 / 255 %}
{% else %}
{% set R1 = ((pos - 170) * 3) / 255 %}
{% set G1 = 0 %}
{% set B1 = (255 - (pos - 170) * 3) /255 %}
{% endif %}
{% endif %}
{% if R1 > 1 %}
{% set R1=1 %}
{% endif %}
{% if G1 > 1 %}
{% set G1=1 %}
{% endif %}
{% if B1 > 1 %}
{% set B1=1 %}
{% endif %}
SET_LED LED=Enclosure_Lights RED={R1} GREEN={G1} BLUE={B1} SYNC=1
G4 P25
{% endfor %}
{% endfor %}