Skip to content

Instantly share code, notes, and snippets.

@digitalresistor
Created September 11, 2025 18:44
Show Gist options
  • Select an option

  • Save digitalresistor/d5f2f4ed2e4393857060ca92072f6ed6 to your computer and use it in GitHub Desktop.

Select an option

Save digitalresistor/d5f2f4ed2e4393857060ca92072f6ed6 to your computer and use it in GitHub Desktop.
Centauri Carbon g-code changes
;LAYER:{layer_num + 1}
;=== Important to make the printer properly display the current layer, and do timelapse video
SET_PRINT_STATS_INFO CURRENT_LAYER={layer_num + 1}
;BEFORE_LAYER_CHANGE
;[layer_z]
G92 E0
;;===== date: 20240520 =====================
;printer_model:[printer_model]
;initial_filament:{filament_type[initial_extruder]}
;curr_bed_type:{curr_bed_type}
M400 ; wait for buffer to clear
M220 S100 ;Set the feed speed to 100%
M221 S100 ;Set the flow rate to 100%
M104 S140
M140 S[bed_temperature_initial_layer_single]
G90
G28 ;home
M729 ;Clean Nozzle
; M106 P2 S255
M190 S[bed_temperature_initial_layer_single]
M8210 S[bed_temperature_initial_layer_single] ; Set bed_mesh_temp
BED_MESH_CALIBRATE
; M106 P2 S0
;=============turn on fans to prevent PLA jamming=================
{if filament_type[initial_no_support_extruder]=="PLA"}
{if (bed_temperature[initial_no_support_extruder] >50)||(bed_temperature_initial_layer[initial_no_support_extruder] >50)}
M106 P3 S255
{elsif (bed_temperature[initial_no_support_extruder] >45)||(bed_temperature_initial_layer[initial_no_support_extruder] >45)}
M106 P3 S180
{endif};Prevent PLA from jamming
{endif}
;enable_pressure_advance:{enable_pressure_advance[initial_extruder]}
;This value is called if pressure advance is enabled
{if enable_pressure_advance[initial_extruder] == "true"}
SET_PRESSURE_ADVANCE ADVANCE=[pressure_advance] ;
M400
{endif}
M204 S{min(20000,max(1000,outer_wall_acceleration))} ;Call exterior wall print acceleration
;======= Updated to put it on the edge of the build area, instead of negatively offset outside of it, thereby allowing the use of X1/P1 build plates in the CC
G1 X{print_bed_max[0]*0.5} Y0 F20000
G1 Z0.3 F900
M109 S[nozzle_temperature_initial_layer]
M83
G92 E0 ;Reset Extruder
G1 F{min(6000, max(900, filament_max_volumetric_speed[initial_no_support_extruder]/0.5/0.3*60))}
G1 X0 E10.156 ;Draw the first line
G1 Y98.8 E7.934
G1 X0.7 Y100 E0.1
G1 Y0.9 E7.934
G1 X{print_bed_max[0]*0.5-50} E6.284
G1 F{0.2*min(12000, max(1200, filament_max_volumetric_speed[initial_no_support_extruder]/0.5/0.3*60))}
G1 X{print_bed_max[0]*0.5-30} E2
G1 F{min(12000, max(1200, filament_max_volumetric_speed[initial_no_support_extruder]/0.5/0.3*60))}
G1 X{print_bed_max[0]*0.5-10} E2
G1 F{0.2*min(12000, max(1200, filament_max_volumetric_speed[initial_no_support_extruder]/0.5/0.3*60))}
G1 X{print_bed_max[0]*0.5+10} E2
G1 F{min(12000, max(1200, filament_max_volumetric_speed[initial_no_support_extruder]/0.5/0.3*60))}
G1 X{print_bed_max[0]*0.5+30} E2
G1 F{min(12000, max(1200, filament_max_volumetric_speed[initial_no_support_extruder]/0.5/0.3*60))}
G1 X{print_bed_max[0]*0.5+50} E2
;End PA test.
G3 I-1 J0 Z0.6 F1200.0 ;Move to side a little
G1 F20000
G92 E0 ;Reset Extruder
SET_PRINT_STATS_INFO TOTAL_LAYER=[total_layer_count]
;LAYER_COUNT:[total_layer_count]
;LAYER:0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment