[gcode_macro END_PRINT] gcode: TURN_OFF_HEATERS # move head away from print G91 ; relative coordinates G1 X-2 Y-2 E-3 F300 ; Move nozzle away from print while retracting G1 Z10 F3000 ; Raise nozzle by 10mm G90 ; absolute coordinates # present print G1 Y220 ; forward bed G28 X0 ; home X axis M84 ; disable motors M300 ; beep [gcode_macro LIGHT_ON] gcode: SET_PIN PIN=light VALUE=1 [gcode_macro LIGHT_OFF] gcode: SET_PIN PIN=light VALUE=0 [gcode_macro M300] gcode: # Use a default 1kHz tone if S is omitted. {% set S = params.S|default(1000)|int %} # Use a 10ms duration is P is omitted. {% set P = params.P|default(10)|int %} SET_PIN PIN=buzzer VALUE=1 G4 P{P} SET_PIN PIN=buzzer VALUE=0