Skip to content

Instantly share code, notes, and snippets.

@pyrho
Last active October 11, 2023 13:14
Show Gist options
  • Select an option

  • Save pyrho/2059a33015346ad7ffb974c5c76fd844 to your computer and use it in GitHub Desktop.

Select an option

Save pyrho/2059a33015346ad7ffb974c5c76fd844 to your computer and use it in GitHub Desktop.

Revisions

  1. pyrho revised this gist Oct 11, 2023. 1 changed file with 16 additions and 8 deletions.
    24 changes: 16 additions & 8 deletions timelapse.gcode
    Original file line number Diff line number Diff line change
    @@ -1,15 +1,23 @@
    ;AFTER_LAYER_CHANGE
    ;AFTER LAYER CHANGE
    ;[layer_z]

    G1 E-2 F3600 ; retract
    G0 X-1 Y170 F18000 ; press switch
    M400 ;Wait for all moves to finish
    { if layer_num >= 1 }
    ; Retraction is not needed
    ;G1 E-2 F3600 ; retract

    G0 X0 Y170 F{travel_speed*60} ; get next to the switch
    M400 ;Wait for all moves to finish

    G0 X1 F18000 ; Stop trigger, that's when the picture is actually taken
    G0 X-1 F3000 ; press switch
    M400 ;Wait for all moves to finish
    G4 P1000 ;Wait for 1s

    G1 E1.9 F3400 ; prime

    G0 X1 F{travel_speed*60} ; Un-trigger, that's when the picture is actually taken
    M400 ;Wait for all moves to finish
    G4 P400;Wait for 400ms, to let the camera take the picture

    ; Retraction is not needed, so no priming either
    ;G1 E1.95 F3400 ; prime
    ;M400 ;Wait for all moves to finish

    ;[layer_z]
    {endif}
  2. pyrho revised this gist Oct 6, 2023. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion timelapse.gcode
    Original file line number Diff line number Diff line change
    @@ -9,7 +9,7 @@ G0 X1 F18000 ; Stop trigger, that's when the picture is actually taken
    M400 ;Wait for all moves to finish
    G4 P1000 ;Wait for 1s

    G1 E2 F3400 ; prime
    G1 E1.9 F3400 ; prime
    M400 ;Wait for all moves to finish

    ;[layer_z]
  3. pyrho revised this gist Oct 4, 2023. 1 changed file with 2 additions and 3 deletions.
    5 changes: 2 additions & 3 deletions timelapse.gcode
    Original file line number Diff line number Diff line change
    @@ -1,16 +1,15 @@
    ;AFTER_LAYER_CHANGE

    {if layer_z > 1}
    G1 E-2 F3600 ; retract
    G0 X-1 Y170 F18000 ; press switch
    M400 ;Wait for all moves to finish


    G0 X1 F18000 ; Stop trigger, that's when the picture is actually taken
    M400 ;Wait for all moves to finish
    G4 P2000 ;Wait for 1s
    G4 P1000 ;Wait for 1s

    G1 E2 F3400 ; prime
    M400 ;Wait for all moves to finish
    {endif}

    ;[layer_z]
  4. pyrho revised this gist Sep 30, 2023. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion timelapse.gcode
    Original file line number Diff line number Diff line change
    @@ -10,7 +10,7 @@ G0 X1 F18000 ; Stop trigger, that's when the picture is actually taken
    M400 ;Wait for all moves to finish
    G4 P2000 ;Wait for 1s

    G1 E1.9 F3400 ; prime
    G1 E2 F3400 ; prime
    M400 ;Wait for all moves to finish
    {endif}
    ;[layer_z]
  5. pyrho revised this gist Sep 30, 2023. 1 changed file with 2 additions and 1 deletion.
    3 changes: 2 additions & 1 deletion timelapse.gcode
    Original file line number Diff line number Diff line change
    @@ -1,5 +1,6 @@
    ;AFTER_LAYER_CHANGE

    {if layer_z > 1}
    G1 E-2 F3600 ; retract
    G0 X-1 Y170 F18000 ; press switch
    M400 ;Wait for all moves to finish
    @@ -11,5 +12,5 @@ G4 P2000 ;Wait for 1s

    G1 E1.9 F3400 ; prime
    M400 ;Wait for all moves to finish

    {endif}
    ;[layer_z]
  6. pyrho revised this gist Sep 29, 2023. No changes.
  7. pyrho revised this gist Sep 29, 2023. 1 changed file with 2 additions and 2 deletions.
    4 changes: 2 additions & 2 deletions timelapse.gcode
    Original file line number Diff line number Diff line change
    @@ -1,11 +1,11 @@
    ;AFTER_LAYER_CHANGE

    G1 E-2 F3600 ; retract
    G0 X-1 Y170 F6000 ; press switch
    G0 X-1 Y170 F18000 ; press switch
    M400 ;Wait for all moves to finish


    G0 X1 F6000 ; Stop trigger, that's when the picture is actually taken
    G0 X1 F18000 ; Stop trigger, that's when the picture is actually taken
    M400 ;Wait for all moves to finish
    G4 P2000 ;Wait for 1s

  8. pyrho revised this gist Sep 29, 2023. 1 changed file with 5 additions and 4 deletions.
    9 changes: 5 additions & 4 deletions timelapse.gcode
    Original file line number Diff line number Diff line change
    @@ -1,14 +1,15 @@
    ;AFTER_LAYER_CHANGE

    G1 E-5 F3600 ; retract
    G0 X-1 Y170 F18000 ; press switch
    G1 E-2 F3600 ; retract
    G0 X-1 Y170 F6000 ; press switch
    M400 ;Wait for all moves to finish


    G0 X1 F6000 ; Stop trigger, that's when the picture is actually taken
    M400 ;Wait for all moves to finish
    G4 P1000 ;Wait for 1s
    G4 P2000 ;Wait for 1s

    G1 E4.9 F3400 ; prime
    G1 E1.9 F3400 ; prime
    M400 ;Wait for all moves to finish

    ;[layer_z]
  9. pyrho revised this gist Sep 29, 2023. 1 changed file with 1 addition and 2 deletions.
    3 changes: 1 addition & 2 deletions timelapse.gcode
    Original file line number Diff line number Diff line change
    @@ -1,10 +1,9 @@
    ;AFTER_LAYER_CHANGE

    G1 E-5 F3600 ; retract
    G0 X-1 Y170 F6000 ; press switch
    G0 X-1 Y170 F18000 ; press switch
    M400 ;Wait for all moves to finish


    G0 X1 F6000 ; Stop trigger, that's when the picture is actually taken
    M400 ;Wait for all moves to finish
    G4 P1000 ;Wait for 1s
  10. pyrho revised this gist Sep 22, 2023. 1 changed file with 7 additions and 8 deletions.
    15 changes: 7 additions & 8 deletions timelapse.gcode
    Original file line number Diff line number Diff line change
    @@ -1,16 +1,15 @@
    ;AFTER_LAYER_CHANGE

    G1 E-2 F3600 ; retract
    G4 S0 ;Wait for move to finish
    G0 X-1 Y170 F6000 ; activate switch
    G4 S0 ;Wait for move to finish
    G1 E-5 F3600 ; retract
    G0 X-1 Y170 F6000 ; press switch
    M400 ;Wait for all moves to finish


    G0 X1 F6000 ; Stop trigger, that's when the picture is actually taken
    G4 S0 ;Wait for move to finish
    G4 P1000 ;Wait for 500ms
    M400 ;Wait for all moves to finish
    G4 P1000 ;Wait for 1s

    G1 E1.9 F3400 ; prime
    G4 S0 ;Wait for move to finish
    G1 E4.9 F3400 ; prime
    M400 ;Wait for all moves to finish

    ;[layer_z]
  11. pyrho revised this gist Sep 22, 2023. 1 changed file with 4 additions and 3 deletions.
    7 changes: 4 additions & 3 deletions timelapse.gcode
    Original file line number Diff line number Diff line change
    @@ -1,15 +1,16 @@
    ;AFTER_LAYER_CHANGE

    G1 E-1 F3600 ; retract
    G1 E-2 F3600 ; retract
    G4 S0 ;Wait for move to finish
    G0 X-1 Y170 F6000 ; activate switch
    G4 S0 ;Wait for move to finish


    G0 X1 F6000 ; Stop trigger, that's when the picture is actually taken
    G4 S0 ;Wait for move to finish
    G4 P500 ;Wait for 500ms
    G4 P1000 ;Wait for 500ms

    G1 E0.9 F3400 ; prime
    G1 E1.9 F3400 ; prime
    G4 S0 ;Wait for move to finish

    ;[layer_z]
  12. pyrho created this gist Sep 22, 2023.
    15 changes: 15 additions & 0 deletions timelapse.gcode
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,15 @@
    ;AFTER_LAYER_CHANGE

    G1 E-1 F3600 ; retract
    G0 X-1 Y170 F6000 ; activate switch
    G4 S0 ;Wait for move to finish


    G0 X1 F6000 ; Stop trigger, that's when the picture is actually taken
    G4 S0 ;Wait for move to finish
    G4 P500 ;Wait for 500ms

    G1 E0.9 F3400 ; prime
    G4 S0 ;Wait for move to finish

    ;[layer_z]