Skip to content

Instantly share code, notes, and snippets.

@maniq2
Last active December 16, 2025 17:09
Show Gist options
  • Select an option

  • Save maniq2/d49f095609cfce0e0a6e080d9cba46cc to your computer and use it in GitHub Desktop.

Select an option

Save maniq2/d49f095609cfce0e0a6e080d9cba46cc to your computer and use it in GitHub Desktop.
Simplified Bambu A1mini end gcode. No sound. Tested with Orca Slicer. Public release.
;===== Simplified Bambu A1mini end gcode. No sound.
;===== MN v1.2 ===== Date: 20251216
;===== 1.2 Sequence organisation
;===== retraction and safe positioning
M104 S{nozzle_temperature_initial_layer[initial_extruder]-40}
G90 ; absolute positioning
M83 ; relative extrusion
G92 E0 ; zero the extruder
G392 S0 ; disable clog detection
G1 E-1.2 F1500 ; final retract
G1 Z{max_layer_z+0.5} F1200 ; safe Z raise
G0 X-13.5 Y{first_layer_center_no_wipe_tower[1]} F18000 ; move to safe position
;===== timelapse (flagged)
{if !spiral_mode && print_sequence != "by object"}
M1002 judge_flag timelapse_record_flag
M622 J1
M971 S11 C11 O0 ; timelapse final capture
M991 S0 P-1 ; end timelapse
M623
{endif}
;===== bed heating, fans and lights
M140 S0 ; disable bed heating
M106 P1 S0 ; disable part fan
M106 P2 S0 ; disable auxiliary fan
M106 P3 S0 ; disable chamber fan
M960 S1 P0 ; disable led ch1
M960 S2 P0 ; disable led ch2
; ===== pull filament to AMS
M620 S255
G0 X180 F12000
T255
G0 X0 F18000
G0 X-13.5 F3000 ; wipe
G0 X0 F18000
M621 S255
M104 S0 ; disable hotend heating
;===== final positioning
M400 ; finish movements
M17 S ; motor status
M17 Z0.3 ; lower Z motor current
{if (max_layer_z+5) < 180}
G1 Z{max_layer_z+5} F1200 ; raise 5 mm
{else}
G1 Z180 F1200 ; raise to max height
{endif}
M400 ; finish movements
M17 R ; restore Z motor current
G0 X-13 Y180 F3600 ; park at rear left in service area
;===== reset parameters
M220 S100 ; reset feedrate to 100%
M201.2 K1.0 ; reset acceleration magnitude
M73.2 R1.0 ; reset time left magnitude
M1002 set_gcode_claim_speed_level : 0
M400 ; finish movements
M960 S5 P0 ; disable toolhead led
M18 X Y Z ; disable X Y Z motors
;===== end of print
; Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
; The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
; THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment