Skip to content

Instantly share code, notes, and snippets.

@sabarjp
Last active February 22, 2023 17:20
Show Gist options
  • Save sabarjp/a879410a14712d2e9b341a3b21823920 to your computer and use it in GitHub Desktop.
Save sabarjp/a879410a14712d2e9b341a3b21823920 to your computer and use it in GitHub Desktop.

Revisions

  1. sabarjp renamed this gist Dec 3, 2019. 1 changed file with 0 additions and 0 deletions.
  2. sabarjp created this gist Dec 3, 2019.
    50 changes: 50 additions & 0 deletions gistfile1.txt
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,50 @@
    M117 Heating... ;Put printing message on LCD screen
    M300 S2500 P100; Beep
    M204 T1250 ; sets acceleration (P, T) and retract acceleration (R), mm/sec^2
    M221 S{if layer_height<0.075}100{else}100{endif} ; Set flow
    M104 S140 ; set extruder temp
    M140 S[first_layer_bed_temperature] ; set bed temp

    ;G1 Z50 ; this is a good start heating position
    G28 X Y; Home X Y
    G1 Y10 ; this is a good start heating position
    M84 ; disable motors

    M109 S140; wait for extruder temp

    ; Auto Leveling
    M280 P0 S160 ; BLTouch alarm release
    G4 P100 ; delay for BLTouch
    G28 ; home
    G29 ; auto bed leveling ONLY UNCOMMENT THIS IF BED LEVELING WITH BLTOUCH REMOVE
    M500 ; ONLY UNCOMMENT THIS IF BED LEVELING WITH BLTOUCH REMOVE
    ;M420 S1 ; Load Saved Eeprom From Auto Level

    M104 S[first_layer_temperature] ; set extruder temp

    ; Start of print
    G21; metric values
    G90 ; absolute positioning
    M83 ; use relative distances for extrusion

    ; You may want to adjust the X and Y here so the nozzle is really above the bed!
    G1 X0 Y0 F7200 ; Move to a position in the left front of the bed
    G1 Z0.6; Move nozzle above 0.6 mm of the bed
    G91 ; Use relative mode

    M109 S[first_layer_temperature] ; wait for extruder temp
    M190 S[first_layer_bed_temperature] ; wait for bed temp



    ; now print a line of filament to prepare extrusion
    G1 F1800 E3
    G1 Y40 E20 F1000 ; prints a line in the front
    G1 Y40 E20 F800 ; prints a line in the front

    ; Done with the dancing :)
    G92 E0 ; Set extrusion distance to 0
    G90 ; switch back to absolute mode

    M117 Printing... ;Put printing message on LCD screen
    ; Start of actual GCode for the print