Skip to content

Instantly share code, notes, and snippets.

@riaancornelius
Created May 7, 2020 12:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save riaancornelius/31310a3bee85e88046fbf64bc0c4c26e to your computer and use it in GitHub Desktop.
Save riaancornelius/31310a3bee85e88046fbf64bc0c4c26e to your computer and use it in GitHub Desktop.
Prusa i3 custom gcode
; Cura:
;Turn strip red to indicate things are hot
M400
M150 R255
G1 E-2 ; retract the filament by 2mm
G0 X0 Y0 ; move X/Y to min endstops so the head is out of the way
M84 ; disable motors
M107 ; Turn off fan
M104 S0 ; turn off extruder
M400
M150 R255 B128
M400
M150 U255
M140 S0 ; turn off bed
G4 S60 ;wait 60 seconds
M400
M150 0
M355 S0
;Cura:
;Turn off RGB strip
M150 0
M150 R255 U255
M190 S35
M400
M150 R255
M140 S{material_bed_temperature} ;Start heating bed
G28
M420 S1 Z2
G0 X0 Y0 ; move X/Y to min endstops
M400
M109 S{material_print_temperature} ;Wait for extruder to reach temp before proceeding
M190 S{material_bed_temperature} ;Wait for bed to reach temp before proceeding
M400
M355 S255
M107 ; Turn off fan
G90 ; Absolute positioning
M82 ; Extruder in absolute mode
G92 E0 ; Reset extruder position
G1 Z5.0 F{travel_speed} ;move the platform down 5mm
G1 Y-3.0 F500.0 ; move out of print volume
G1 X30.0 Z0 E10 F500.0 ; start purge
G1 X60 E15 F500.0 ; finish purge line
G92 E0 ;zero the extruded length again
M117 Printing... ; Put printing message on LCD screen
M400
M150 R75 U0 B130
; Simplify 3D:
;Turn off RGB strip
M150 0
;Turn RGB strip yellow to indicate prep
M150 R255 U255
;Start heating bed. I assume it is always hotter than 45C if used, otherwise, it just won't preheat
; Wait for it to get to 45C before continuing
{IF [bed1_temperature]>44} M190 S45
M400
;Turn RGB strip red to indicate things are getting dangerously hot
M150 R255
;continue heating bed. I assume it is always hotter than 60C if used, otherwise, it just won't preheat
; Wait for it to get to 60C before continuing
{IF [bed1_temperature]>59} M190 S60
; Now heat the bed to set temps - don't wait
M140 S[bed1_temperature] ;Start heating bed
;Do all the other prep
;Set the Z distance between the probe and the nozzle
;M851 Z-5.45
M851 Z-3.1
;Home all Axis
G28
;Auto bed leveling
G29
G0 X0 Y0 ; move X/Y to min endstops
; Wait for temps to stabilise
{IF [bed1_temperature]>79} M190 S85 ;Wait for bed to get closer to temp before turning on extruder heating
M109 S[extruder0_temperature] ;Wait for extruder to reach temp before proceeding
M190 S[bed1_temperature] ;Wait for bed to reach temp before proceeding
M400
;Turn on case light
M355 S255
G0 Z15 F{Z_TRAVEL_SPEED}
M107 ; Turn off fan
G90 ; Absolute positioning
M82 ; Extruder in absolute mode
G1 Z5.0 F{travel_speed} ;move the platform down 5mm
G92 E0 ; Reset extruder position
G1 F200 E5 ;Extrude 5mm of feed stock
G92 E0 ;zero the extruded length again
M900 K0.02
M117 Printing... ; Put printing message on LCD screen
;Turn strip dim purple while printing
M400
M150 R128 B64
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment