Skip to content

Instantly share code, notes, and snippets.

View duganj's full-sized avatar

John Dugan duganj

View GitHub Profile
G21 ; metric values
G90 ; absolute positioning
M82 ; set extruder to absolute mode
M107 ; start with the fan off
M140 S[first_layer_bed_temperature] ; Set bed temperature (no wait)
G28 X Y F6000 ; move X/Y to min endstops
G28 Z F1200 ; move Z to min endstops ; raise the nozzle
G28 X Y F6000 ; move X/Y to min endstops
M190 S[first_layer_bed_temperature] ; wait for bed temperature to reach target
M104 S[first_layer_temperature] ; set extruder temperature (no wait)
M104 S0 ; extruder heater off
M140 S0 ; heated bed heater off
M107; Turn fan off
G91 ; relative positioning
G1 E-1 F300 ; retract the filament a bit before lifting the nozzle to release some of the pressure
G1 Z+2.0 F6000 ; move Z up
G1 E-5 F300 ; retract filament even more
G90 ; absolute positioning
G1 X0 F6000 ; move X to min endstops so the head is out of the way
G1 Y160 F6000 ; move the bed so it is easy to access to the printed part