forked from gritsenko-konstantin/DoomConfig
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathled.cfg
More file actions
74 lines (57 loc) · 2.13 KB
/
led.cfg
File metadata and controls
74 lines (57 loc) · 2.13 KB
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
########################
###### NEOPIXEL ######
########################
[neopixel my_neopixel]
pin: P1.24
chain_count: 44
color_order: GRB
initial_RED: 0.5
initial_GREEN: 0.5
initial_BLUE: 0.5
[gcode_macro red]
# turn on Red full brightness, turn off all other LED colours
gcode:
SET_LED LED=my_neopixel RED=1.0 GREEN=0.0 BLUE=0.0 TRANSMIT=1
[gcode_macro green]
# turn on Red full brightness, turn off all other LED colours
gcode:
SET_LED LED=my_neopixel RED=0.0 GREEN=1.0 BLUE=0.0 TRANSMIT=1
[gcode_macro blue]
# turn on Red full brightness, turn off all other LED colours
gcode:
SET_LED LED=my_neopixel RED=0.0 GREEN=.75 BLUE=1.0 TRANSMIT=1
[gcode_macro white]
# turn on Red full brightness, turn off all other LED colours
gcode:
SET_LED LED=my_neopixel RED=0.80 GREEN=0.80 BLUE=0.80 TRANSMIT=1
[gcode_macro yellow]
# turn on Red full brightness, turn off all other LED colours
gcode:
SET_LED LED=my_neopixel RED=1.0 GREEN=1.0 BLUE=0 TRANSMIT=1
[gcode_macro ledoff]
# turn on Red full brightness, turn off all other LED colours
gcode:
SET_LED LED=my_neopixel RED=0.0 GREEN=0.0 BLUE=0.0 TRANSMIT=1
[gcode_macro flicker]
gcode:
{% set LEDTimes = [10, 20, 20, 240, 20, 40, 20, 100, 20, 20, 20, 260, 80, 20, 240, 60, 160, 20, 240, 20, 1000, 20, 20, 40, 100, 20, 274, 340, 860, 20, 1400, 20, 60, 20] %}
{% set RGB_Red = 0.2 %}
{% set RGB_Green = 0.2 %}
{% set RGB_Blue = 0.2 %}
{% set RGB_Strip = "my_neopixel" %}
{% for toggletime in LEDTimes %}
{% set ledTime = toggletime|string %}
{% set loopCount = loop.index %}
{% if loopCount is divisibleby 2 %} # If the loop index is divisible by 2 (firtst index is NOT so the LEd should turn ON)
SET_LED LED={RGB_Strip} RED={RGB_Red} GREEN={RGB_Green} BLUE={RGB_Blue}
G4 P{ledTime|int}
{% else %}
SET_LED LED={RGB_Strip}
G4 P{ledTime|int}
{% endif %}
{% endfor %}
{% for i in range(1,9) %} # loops 1,2,3,4,5
{action_respond_info(i|string)}
SET_LED LED={RGB_Strip} RED={RGB_Red+(i/10)} GREEN={RGB_Green+(i/10)} BLUE={RGB_Blue+(i/10)} INDEX=1
G4 P200
{% endfor %}