Skip to content

Instantly share code, notes, and snippets.

@maniq2
Last active December 2, 2025 15:35
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. Public release.
;===== Simplified Bambu A1mini end gcode. No sound.
;===== maniq v1.1 ===== Date: 20251124
;===== 1.1 Faster and lower final raising
;===== retraction and safe positioning
G392 S0 ; turn off clog detect
M400 ; wait for buffer to clear
G92 E0 ; zero the extruder
G1 E-0.8 F1800 ; final retract
G1 Z{max_layer_z + 0.5} F900 ; raise Z slightly
G0 X-13.0 Y{first_layer_center_no_wipe_tower[1]} F18000 ; move to safe pos
;===== timelapse handling (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 at safe pos
M623
{endif}
;===== turn off heating, fans and lights
M140 S0 ; turn off bed
M106 S0 ; turn off part cooling fan
M106 P2 S0 ; turn off auxiliary fan
M106 P3 S0 ; turn off chamber fan
M960 S1 P0 ; turn off LED channel 1
M960 S2 P0 ; turn off LED channel 2
; ===== pull back filament to AMS
M620 S255
G1 X181 F12000
T255
G0 X0 F18000
G0 X-13.0 F3000 ; wipe
G0 X0 F18000
M621 S255
M104 S0 ; turn off hotend
;===== final positioning
M400 ; wait all motion done
M17 S ; motor status
M17 Z0.3 ; lower Z motor current (protection)
{if (max_layer_z + 20) < 180}
G1 Z{max_layer_z + 20} F800 ; raise Z
{else}
G1 Z180 F800 ; raise to max height
{endif}
M400 P100 ; short pause
M17 R ; restore Z motor current
G90 ; absolute positioning
G0 X0 Y180 F3600 ; park at rear left
G91 ; relative positioning
G1 Z-1 F600 ; lower 1mm gently
G90 ; back to absolute
M83 ; relative extrusion
;===== 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 S1 ; wait complete finish
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