Download Print this page

Velleman-Kit K8403 User Manual page 11

Advertisement

Control the LEDs with a G-Code
With the M420 code you can control your LED add-on trough G-Code.
1) standard code: M420 Rx Ex Bx
2) x can be 0 or 1 to turn a color on or off
3) R = Red, E = Green, B = Blue
Not all values are needed, if a value is missing the previous state of the missing color is kept.
1) M420 R1 E1 (turn the red and green LEDs on, don't change the state of the blue LEDs)
2) M420 B0 (turn off the Blue LEDs and don't change the state of the others)
Example with Start G-Code in Repetier:
M420 R0 E0 B1; Set the LEDs to blue
G28 ; Home extruder
M420 R1 B0; Set the LEDs to red
G1 Z5 F{Z_TRAVEL_SPEED}
G1 Z0 F{Z_TRAVEL_SPEED}
M106 S165 ; Turn on fan
G90 ; Absolute positioning
M82 ; Extruder in absolute mode
; Activate all used extruder
{IF_EXT0}M104 T0 S{TEMP0}
{IF_EXT1}M104 T1 S{TEMP1}
G92 E0 ; Reset extruder position
; Wait for all used extruders to reach temperature
{IF_EXT0}M109 T0 S{TEMP0}
{IF_EXT1}M109 T1 S{TEMP1}
{IF_EXT0}T0
{IF_EXT1}T1
M420 R0 E1; Set the LEDs to green
M83
G1 E10 F100
M82
G92 E0 ; Reset extruder position
M117 Vertex is printing
G1 F1000 Z5
USER MANUAL
K8403
All manuals and user guides at all-guides.com
11

Advertisement

loading