Skip to content

Instantly share code, notes, and snippets.

@lhess
Last active February 24, 2024 12:26
Show Gist options
  • Save lhess/d1061787b4b275517e8e285dab738dbe to your computer and use it in GitHub Desktop.
Save lhess/d1061787b4b275517e8e285dab738dbe to your computer and use it in GitHub Desktop.
klipper SKR PRO v1.2 config, i3 cartesian, dual Z, BLTouch, tmc2209
# Specs:
# - SKR 1.2 Pro
# - TMC2209
# - 1.8 stepper on XYZ
# - Dual Z
# - BLTouch
# - Sensorless homing on X
# - Physical endstops on Y
# - BMG extruder with 1.8 stepper
# - e3d Volcano with 12V 40 watts heater
# - Prusa MK52 12V heated bed
# - Fysetc Mini 12864 LCD Display v2.1 RGB
#[mcu rpi]
#serial: /tmp/klipper_host_mcu
#[adxl345]
#cs_pin: rpi:None
#[resonance_tester]
#accel_chip: adxl345
#probe_points:
# 120,120,20 # an example
[mcu]
serial: /dev/serial/by-id/usb-Klipper_stm32f407xx_310047000650533448373220-if00
[printer]
kinematics: cartesian
max_velocity: 250
max_accel: 3000
max_z_velocity: 15
max_z_accel: 300
square_corner_velocity: 5.0
[board_pins]
aliases:
EXP1_1=PG4, EXP1_3=PD11, EXP1_5=PG2, EXP1_7=PG6, EXP1_9=<GND>,
EXP1_2=PA8, EXP1_4=PD10, EXP1_6=PG3, EXP1_8=PG7, EXP1_10=<5V>,
EXP2_1=PB14, EXP2_3=PG10, EXP2_5=PF11, EXP2_7=PF12, EXP2_9=<GND>,
EXP2_2=PB13, EXP2_4=PB12, EXP2_6=PB15, EXP2_8=<RST>, EXP2_10=PF13
[input_shaper]
shaper_freq_x: 58.8
#shaper_freq_y: 45.0
shaper_type: mzv
#####################################################################
# X/Y Stepper Settings
#####################################################################
[stepper_x]
step_pin: PE9
dir_pin: PF1
enable_pin: !PF2
endstop_pin: tmc2209_stepper_x:virtual_endstop
homing_retract_dist: 0
microsteps: 32
rotation_distance: 32
full_steps_per_rotation: 200
position_min: 0
position_endstop: 0
position_max: 250
homing_speed: 70.0
[tmc2209 stepper_x]
uart_pin: PC13
diag_pin: PB10
run_current: 0.850
hold_current: 0.500
stealthchop_threshold: 200
driver_SGTHRS: 120 # 255 is most sensitive value, 0 is least sensitive
[stepper_y]
step_pin: PE11
dir_pin: !PE8
enable_pin: !PD7
endstop_pin: PE12
microsteps: 32
rotation_distance: 32
full_steps_per_rotation: 200
position_min: -4
position_endstop: -4
position_max: 225
homing_speed: 70.0
[tmc2209 stepper_y]
uart_pin: PE3
run_current: 0.850
hold_current: 0.500
stealthchop_threshold: 200
#####################################################################
# Z Stepper Settings
#####################################################################
[stepper_z]
step_pin: PD15
dir_pin: PE7
enable_pin: !PA3
microsteps: 32
rotation_distance: 8
full_steps_per_rotation: 200
position_max: 245
homing_speed: 5.0
position_min: -2
endstop_pin: probe: z_virtual_endstop
[tmc2209 stepper_z]
uart_pin: PD1
run_current: 0.850
hold_current: 0.600
stealthchop_threshold: 100
[stepper_z1]
step_pin: PE13
dir_pin: PC2
enable_pin: !PC0
microsteps: 32
rotation_distance: 8
full_steps_per_rotation: 200
[tmc2209 stepper_z1]
uart_pin: PE1
run_current: 0.850
hold_current: 0.600
stealthchop_threshold: 100
#####################################################################
# Extruder
#####################################################################
[extruder]
step_pin: PE14
dir_pin: !PA0
enable_pin: !PC3
# BMG with 3:1 ratio and 1.8 stepper
microsteps: 32
rotation_distance: 22.598
full_steps_per_rotation: 200
gear_ratio: 50:17
nozzle_diameter: 0.600
filament_diameter: 1.750
max_extrude_cross_section: 50.0
max_extrude_only_distance: 100.0
pressure_advance: 0.100
pressure_advance_smooth_time: 0.040
heater_pin: PB1 # Heater0
sensor_type: ATC Semitec 104GT-2
sensor_pin: PF3 # T0
control: pid
min_extrude_temp: 180
min_temp: 0
max_temp: 280
# e3d V6 Volcano with 12V 40 watts heater
pid_Kp=30.874
pid_Ki=2.018
pid_Kd=118.092
[tmc2209 extruder]
uart_pin: PD4
run_current: 0.700
hold_current: 0.500
stealthchop_threshold: 50
#####################################################################
# Bed Heater
#####################################################################
[heater_bed]
heater_pin: PD12
sensor_type: EPCOS 100K B57560G104F
sensor_pin: PF6 # T3
control: pid
min_temp: 0
max_temp: 110
# Original Prusa MK52 12V heated bed
pid_Kp=49.588
pid_Ki=0.660
pid_Kd=931.638
#####################################################################
# Fans
#####################################################################
[fan]
pin: PC8
[heater_fan extruder_fan]
pin: PE5
heater_temp: 50
[controller_fan stepper_fan]
pin: PE6
max_power: 0.6
shutdown_speed: 0
cycle_time: 0.010
hardware_pwm: False
kick_start_time: 0.100
idle_timeout: 30
idle_speed: 0.6
heater: extruder, heater_bed
#####################################################################
# Probe & Mesh
#####################################################################
[safe_z_home]
home_xy_position: 2,2
speed: 60
z_hop: 5
z_hop_speed: 10
[bltouch]
sensor_pin: ^PA2
control_pin: PA1
stow_on_each_sample: False
samples: 2
speed: 7.5
sample_retract_dist: 3.0
samples_tolerance: 0.025
samples_tolerance_retries: 5
z_offset: 2.4
y_offset: 3.2
x_offset: 25.6
[z_tilt]
z_positions:
0, 112
247, 112
points:
2, 112
210, 112
speed: 120
horizontal_move_z: 5
[bed_mesh]
speed: 120
horizontal_move_z: 5
mesh_min: 27.6,5.2
mesh_max: 240,210
probe_count: 5,5
fade_start: 2.0
fade_end: 12.0
mesh_pps: 2,3
algorithm: bicubic
#####################################################################
# Display
#####################################################################
# Fysetc Mini 12864 LCD Display
[display]
lcd_type: uc1701
cs_pin: EXP1_3
a0_pin: EXP1_4
rst_pin: EXP1_5
contrast: 63
encoder_pins: ^EXP2_5, ^EXP2_3
menu_reverse_navigation: True
click_pin: ^!EXP1_2
spi_software_miso_pin: EXP2_1
spi_software_mosi_pin: EXP2_6
spi_software_sclk_pin: EXP2_2
menu_timeout: 30
[display_data _default_16x4 print_progress]
position: 2, 0
text:
{% if printer["gcode_macro PRUTSCHA_START_PRINT"].value|default(0, true) == 1 %}
{ "{:^10.0%}".format(printer.display_status.progress) }
{% else %}
----------------
{% endif %}
[display_data _default_16x4 progress_bar]
position: 2, 1 # Draw graphical progress bar after text is written
text:
{% if printer["gcode_macro PRUTSCHA_START_PRINT"].value|default(0, true) == 1 %}
{ draw_progress_bar(2, 0, 9, printer.display_status.progress) }
{% endif %}
# Render remaining time taken from M73
[display_data _default_16x4 printing_time]
position: 2, 10
text:
{% if printer["gcode_macro PRUTSCHA_START_PRINT"].value|default(0, true) == 1 %}
{% set ptime = printer["gcode_macro M73"].r %}
{ "R%02d:%02d" % (ptime // 60, ptime % 60) }
{% endif %}
# Neopixel RGB in mini12864 display
[neopixel fysetc_mini12864]
pin: EXP1_6
chain_count: 3
color_order: RGB
initial_RED: 0.2
initial_GREEN: 0.2
initial_BLUE: 1.0
# Beeper
[output_pin beeper]
pin: EXP1_1
pwm: True
value: 0
shutdown_value: 0
cycle_time: 0.0024
#####################################################################
# Misc
#####################################################################
[filament_switch_sensor filament_sensor]
switch_pin: !PG5
event_delay: 1.0
pause_on_runout: False
pause_delay: .0001
insert_gcode:
G4 P300
LOAD_FILAMENT
runout_gcode:
M600 X100 Y0 Z50
[force_move]
enable_force_move: True
[pause_resume]
[idle_timeout]
gcode:
M84
PRUTSCHA_STOP_PRINT
PRUTSCHA_READY
[virtual_sdcard]
path: ~/gcode_files
[display_status]
[respond]
[save_variables]
filename: ~/klipper_config/_saved_variables/variables.cfg
[temperature_sensor raspberry_pi]
sensor_type: temperature_host
min_temp: 10
max_temp: 100
[temperature_sensor mcu_temp]
sensor_type: temperature_mcu
min_temp: 0
max_temp: 100
#####################################################################
# Macros
#####################################################################
#[gcode_macro PRUTSCHA_Z_OFFSET_FROM_VARS]
#gcode:
# SET_GCODE_OFFSET Z=0
# SET_GCODE_OFFSET Z_ADJUST={printer.save_variables.variables.plate_offset_z|float}
# M117 Sheet: {printer.save_variables.variables.plate_name}
# {action_respond_info("Init Plate: %s --> set z_offset: %.3f" % (printer.save_variables.variables.plate_name|string,printer.save_variables.variables.plate_offset_z|float))}
[gcode_macro PRUTSCHA_SET_DISPLAY_COLOR]
gcode:
{% set R = params.R|default(0.0)|int %}
{% set G = params.G|default(0.0)|int %}
{% set B = params.B|default(0.0)|int %}
SET_LED LED=fysetc_mini12864 RED={params.R} GREEN={params.G} BLUE={params.B} INDEX=1 TRANSMIT=0
SET_LED LED=fysetc_mini12864 RED={params.R} GREEN={params.G} BLUE={params.B} INDEX=2 TRANSMIT=0
SET_LED LED=fysetc_mini12864 RED={params.R} GREEN={params.G} BLUE={params.B} INDEX=3
[delayed_gcode PRUTSCHA_INIT_PRINTER]
initial_duration: 1
gcode:
# PRUTSCHA_Z_OFFSET_FROM_VARS
PRUTSCHA_READY
[gcode_macro PRUTSCHA_READY]
gcode:
PRUTSCHA_SET_DISPLAY_COLOR R=0.2 G=0.2 B=1.0
M117 PRUTSCHA Ready
[gcode_macro PRUTSCHA_START_PRINT]
variable_value: 0
gcode:
{% set PREHEAT_TEMP = params.PREHEAT_TEMP|default(170)|int %}
{% set EXTRUDER_TEMP = params.EXTRUDER_TEMP|default(200)|int %}
{% set BED_TEMP = params.BED_TEMP|default(65)|int %}
{% set CLIBRATION_TEMP = ([(EXTRUDER_TEMP|int), (PREHEAT_TEMP|int)] | min) %}
{% set PURGE_NOZZLE = ((EXTRUDER_TEMP|int) >= (printer.configfile.config["extruder"]["min_extrude_temp"]|int)) %}
M118 PRUTSCHA_START_PRINT: Initial extruder temperature: {EXTRUDER_TEMP}
M118 PRUTSCHA_START_PRINT: Bed temperature: {BED_TEMP}
M118 PRUTSCHA_START_PRINT: Preheating extruder to {CLIBRATION_TEMP} for calibration
M118 PRUTSCHA_START_PRINT: Purge nozzle: {PURGE_NOZZLE}
CLEAR_PAUSE
SET_GCODE_VARIABLE MACRO=PRUTSCHA_START_PRINT VARIABLE=value VALUE=1
M107 ; turn off fan
M220 S100; set speed to 100%
G21 ; set units to millimeters
G90 ; use absolute positioning
M82 ; absolute extrusion mode
M117 Preheating...
PRUTSCHA_SET_DISPLAY_COLOR R=1.0 G=0.0 B=0.0
M104 S{CLIBRATION_TEMP} ; set extruder temp
M140 S{BED_TEMP} ; set bed temp
M190 S{BED_TEMP} ; wait for bed temp
M109 S{CLIBRATION_TEMP} ; wait for extruder temp
M117 Homing...
G28 ; home
M117 Calibrating Z tilt...
Z_TILT_ADJUST
M117 Mesh bed leveling...
BED_MESH_CALIBRATE
M117 Preparing for print...
G1 X2.0 Y-3.0 Z2.0 F6000.0 ; goto start position for line
M117 Heating extruder...
M109 S{EXTRUDER_TEMP} ; set and wait for extruder temp
PRUTSCHA_SET_DISPLAY_COLOR R=0.0 G=1.0 B=0.0
M221 S100 ; set flow to 100
{% if PURGE_NOZZLE %}
M117 Purge bubble...
G1 Z0.2 F800 ;
G92 E0.0 ; reset extruder distance position
G91 ; relative positioning
G1 E10 F500 ; Purge Bubble
M117 Purge line 1/2...
G1 X60.0 E10 F1000 ; intro line
G1 X60.0 E20 F700 ; intro line
M117 Purge line 2/2...
G1 X5 Z0.1 F3000 ; outro line
G1 X20 Z0.05 F500 ; outro line
{% endif %}
M117 Starting print...
G90 ; absolute positioning
G1 Z1 F3000 ; lift nozzle a bit
G92 E0.0 ; reset extruder distance position
[gcode_macro PRUTSCHA_STOP_PRINT]
gcode:
{% set parking = params.PARKING|default(True) %}
M400 ; wait for buffer to clear
SET_GCODE_VARIABLE MACRO=PRUTSCHA_START_PRINT VARIABLE=value VALUE=0
TURN_OFF_HEATERS
M107 ; turn off fan
{% if parking %}
PARKING_POSITION
{% endif %}
M84 ; turn off motors
[gcode_macro PRUTSCHA_RETRACT_FILAMENT]
gcode:
{% set RETRACT_LENGTH = params.RETRACT_LENGTH|default(3)|int %}
{% set MIN_TEMP = (printer.configfile.config["extruder"]["min_extrude_temp"] | min) %}
{% if (printer.extruder.temperature >= (MIN_TEMP|int)) %}
G91 ; relative positioning
M118 PRUTSCHA_RETRACT_FILAMENT: Retracting filament by {RETRACT_LENGTH}mm
G1 E-{RETRACT_LENGTH} F2100 ; retract filament
G90 ; absolute positioning
{% else %}
M118 PRUTSCHA_START_PRINT: Skipped retracting filamant due to min-temp condition {MIN_TEMP}, current extruder temperature is {printer.extruder.temperature}
{% endif %}
[gcode_macro PRUTSCHA_FINISH_PRINT]
gcode:
M117 Finishing print...
PRUTSCHA_RETRACT_FILAMENT
PRUTSCHA_STOP_PRINT
M117 Print finished!
PRUTSCHA_BEEP_CONFIRM
G4 P5000
PRUTSCHA_READY
[gcode_macro PRUTSCHA_STATE]
gcode:
M118 State: { printer["gcode_macro PRUTSCHA_START_PRINT"].value|default(0, true) }, idle state: { printer.idle_timeout.state }
[gcode_macro PARKING_POSITION]
gcode:
{% set RAISE_Z_MIN_POSITION = params.RAISE_Z_MIN_POSITION|default(50)|int %}
{% set RAISE_Z_DISTANCE = params.RAISE_Z_DISTANCE|default(20)|int %}
{% set Z_SPEED = params.Z_SPEED|default(600)|int %}
{% set XY_SPEED = params.XY_SPEED|default(4500)|int %}
{% set PARKING_POSITION_X = params.PARKING_POSITION_X|default(10)|int %}
{% set PARKING_POSITION_Y = params.PARKING_POSITION_Y|default(200)|int %}
{% set MAX_Z = (printer.configfile.config["stepper_z"]["position_max"] | min) %}
{% if 'z' in printer.toolhead.homed_axes %}
G90 ; Absolute positioning
# Go to Z parking position
{% if printer.gcode_move.gcode_position.z < MAX_Z %}
M118 PARKING_POSITION: Z position in known, raising Z...
# Raise Z
{% if printer.gcode_move.gcode_position.z > RAISE_Z_MIN_POSITION %}
{% set new_z_pos = ([(printer.gcode_move.gcode_position.z + (RAISE_Z_DISTANCE | float) ), MAX_Z] | min) %}
M118 PARKING_POSITION: Z axis was below MAX_Z, raising to {new_z_pos}
G1 Z{new_z_pos} F{Z_SPEED}
{% else %}
{% set new_z_pos = ([([(printer.gcode_move.gcode_position.z + (RAISE_Z_DISTANCE | float)), (RAISE_Z_MIN_POSITION | float) ] | max), MAX_Z] | min) %}
M118 PARKING_POSITION: Z axis was below MAX_Z, raising to {new_z_pos}
G1 Z{new_z_pos} F{Z_SPEED}
{% endif %}
{% endif %}
{% else %}
M118 PARKING_POSITION: Z position is unknown, raising not possible
{% endif %}
{% if ('x' in printer.toolhead.homed_axes) and ('y' in printer.toolhead.homed_axes) %}
# Go to XY parking position
G1 X{PARKING_POSITION_X} Y{PARKING_POSITION_Y} F{XY_SPEED}
{% else %}
M118 PARKING_POSITION: X and/or Y position is unknown, parking not possible
{% endif %}
[gcode_macro CANCEL_PRINT]
rename_existing: BASE_CANCEL_PRINT
gcode:
{% set RAISE_Z_MIN_POSITION = params.RAISE_Z_MIN_POSITION|default(30)|int %}
{% set RAISE_Z_DISTANCE = params.RAISE_Z_DISTANCE|default(10)|int %}
{% set RETRACT_LENGTH = params.RETRACT_LENGTH|default(1.5)|int %}
{% set PARKING_POSITION_X = params.PARKING_POSITION_X|default(10)|int %}
{% set PARKING_POSITION_Y = params.PARKING_POSITION_Y|default(200)|int %}
M118 CANCEL_PRINT: Canceling print...
M117 Canceling print
{% if printer["gcode_macro PRUTSCHA_START_PRINT"].value|default(0, true) == 0 %}
M118 CANCEL_PRINT: Printer is not printing
{% elif printer.pause_resume.is_paused %}
M118 CANCEL_PRINT: Printer is paused, no parking needed
{% else %}
PRUTSCHA_RETRACT_FILAMENT
PARKING_POSITION RAISE_Z_MIN_POSITION={RAISE_Z_MIN_POSITION} RAISE_Z_DISTANCE={RAISE_Z_DISTANCE}
{% endif %}
SDCARD_RESET_FILE
BASE_CANCEL_PRINT
PRUTSCHA_STOP_PRINT PARKING=false
PRUTSCHA_READY
[gcode_macro PAUSE]
rename_existing: BASE_PAUSE
gcode:
{% set RAISE_Z_MIN_POSITION = params.RAISE_Z_MIN_POSITION|default(30)|int %}
{% set RAISE_Z_DISTANCE = params.RAISE_Z_DISTANCE|default(10)|int %}
{% set RETRACT_LENGTH = params.RETRACT_LENGTH|default(1.5)|int %}
{% set PARKING_POSITION_X = params.PARKING_POSITION_X|default(10)|int %}
{% set PARKING_POSITION_Y = params.PARKING_POSITION_Y|default(200)|int %}
{% if printer["gcode_macro PRUTSCHA_START_PRINT"].value|default(0, true) == 0 %}
M118 PAUSE: Printer is not printing
{% elif printer.pause_resume.is_paused %}
M118 PAUSE: Printer is paused already
{% else %}
M118 PAUSE: Pausing print...
M117 Pausing print...
M118 PAUSE: Position before BASE_PAUSE: {printer.gcode_move.gcode_position}
SAVE_GCODE_STATE NAME=PAUSE_state
BASE_PAUSE
M118 PAUSE: Position after BASE_PAUSE: {printer.gcode_move.gcode_position}
M220 S100
PRUTSCHA_RETRACT_FILAMENT
PARKING_POSITION RAISE_Z_MIN_POSITION={RAISE_Z_MIN_POSITION} RAISE_Z_DISTANCE={RAISE_Z_DISTANCE}
M400 ; finish moves
G91 ; relative positioning
M118 PAUSE: Position when done: {printer.gcode_move.gcode_position}
M118 PAUSE: Print paused...
M117 Print paused...
{% endif %}
[gcode_macro RESUME]
rename_existing: BASE_RESUME
gcode:
{% set DERETRACTION_LENGTH = params.DERETRACTION_LENGTH|default(5)|int %}
{% if not printer.pause_resume.is_paused %}
M118 RESUME: Printer is not printing
{% else %}
M118 RESUME: Resuming print...
M117 Resuming print
PRUTSCHA_RETRACT_FILAMENT
RESTORE_GCODE_STATE NAME=PAUSE_state MOVE=1 MOVE_SPEED=4500
BASE_RESUME
M118 RESUME: Print resumed
{% endif %}
[gcode_macro LOAD_FILAMENT]
gcode:
{% if printer.extruder.temperature >= (printer.configfile.config["extruder"]["min_extrude_temp"]|int) %}
M220 S100
M300 S500
M118 LOAD_FILAMET: Start loading sequence
M117 Loading Filament...
M83
G92 E0.0
G1 E10 F600
{% if printer["gcode_macro PRUTSCHA_START_PRINT"].value|default(0, true) == 0 %}
{% if 'z' in printer.toolhead.homed_axes %}
M118 LOAD_FILAMET: Z axis is homed
{% if printer.gcode_move.gcode_position.z < 50 %}
M118 LOAD_FILAMET: Z axis was below 50, raising to 50
G91
G1 Z{'%d' % (50 - printer.gcode_move.gcode_position.z)}
{% endif %}
{% else %}
M118 LOAD_FILAMET: Z axis not homed, force raise move
SET_KINEMATIC_POSITION X=5 Y=5 Z=5
G91
G1 Z30
M84
G92 E0.0
{% endif %}
{% else %}
M118 LOAD_FILAMET: Printer seems to print, no Z axis change
{% endif %}
G1 E30 F600
G1 E20 F750
G1 E100 F250
G92 E0.0
M400
M118 LOAD_FILAMET: Done
M117 Load Complete!
M300 S1000
M300 S1000
{% else %}
M118 LOAD_FILAMET: Extruder not preheated
M117 Preheat extruder
PRUTSCHA_BEEP_ALERT
{% endif %}
{% if printer["gcode_macro PRUTSCHA_START_PRINT"].value|default(0, true) == 0 %}
G4 P3000
PRUTSCHA_READY
{% endif %}
[gcode_macro UNLOAD_FILAMENT]
gcode:
{% if printer.extruder.temperature >= (printer.configfile.config["extruder"]["min_extrude_temp"]|int) %}
SET_FILAMENT_SENSOR SENSOR=filament_sensor ENABLE=0
M118 UNLOAD_FILAMENT: Unloading filament
M117 Unloading Filament...
M220 S100
M300 S500
M83
{% if printer["gcode_macro PRUTSCHA_START_PRINT"].value|default(0, true) == 0 %}
# Load a bit
G92 E0.0
G1 E2 F150
G4 P250
{% endif %}
# Unload
G92 E0.0
G1 E-20 F400
G1 E-20 F1000
G1 E-80 F2000
G92 E0.0
M400
M118 UNLOAD_FILAMENT: Remove filament now
M117 Remove filament now!
M300 S1000 P1000
G4 P3000
SET_FILAMENT_SENSOR SENSOR=filament_sensor ENABLE=1
{% else %}
M118 UNLOAD_FILAMENT: Extruder not preheated
M117 Preheat extruder
PRUTSCHA_BEEP_ALERT
{% endif %}
{% if printer["gcode_macro PRUTSCHA_START_PRINT"].value|default(0, true) == 0 %}
G4 P5000
PRUTSCHA_READY
{% endif %}
[gcode_macro PRUTSCHA_BEEP_ALERT]
gcode:
M300 S200 P200
M300 S200 P200
M300 S200 P200
[gcode_macro PRUTSCHA_BEEP_CONFIRM]
gcode:
M300 S1000
M300 S1200
M300 S1400
[gcode_macro M73]
rename_existing: M773
variable_p: 0.0
variable_r: 0.0
gcode:
{% set P = params.P|default(0.0)|int %}
{% set R = params.R|default(0.0)|int %}
M773 P{P}
SET_GCODE_VARIABLE MACRO=M73 VARIABLE=p VALUE={P}
SET_GCODE_VARIABLE MACRO=M73 VARIABLE=r VALUE={R}
[gcode_macro M300]
gcode:
{% set S = params.P|default(1000)|int %}
{% set P = params.P|default(100)|int %}
{% if S|float != 0 %}
SET_PIN PIN=beeper VALUE=0.5 CYCLE_TIME={1/S|float}
{% endif %}
G4 P{P}
SET_PIN PIN=beeper VALUE=0
[gcode_macro M600]
variable_extr_temp: 0
gcode:
{% if printer.toolhead.status == "Ready" %}
M118 M600: No print started yet...
{% else %}
M118 M600: Changing filament...
M117 Changing filament...
PAUSE
UNLOAD_FILAMENT
M118 M600: Insert new filament
M117 Insert new filament
{% endif %}
[gcode_macro DUMP_VARIABLES]
gcode:
{% set filter_name = params.NAME|default('')|string|lower %}
{% set filter_value = params.VALUE|default('')|string|lower %}
{% set show_cfg = params.SHOW_CFG|default(0)|int %}
{% set out = [] %}
{% for key1 in printer %}
{% for key2 in printer[key1] %}
{% if (show_cfg or not (key1|lower == 'configfile' and key2|lower in ['config', 'settings'])) and (filter_name in key1|lower or filter_name in key2|lower) and filter_value in printer[key1][key2]|string|lower %}
{% set dummy = out.append("printer['%s'].%s = %s" % (key1, key2, printer[key1][key2])) %}
{% endif %}
{% else %}
{% if filter_name in key1|lower and filter_value in printer[key1]|string|lower %}
{% set dummy = out.append("printer['%s'] = %s" % (key1, printer[key1])) %}
{% endif %}
{% endfor %}
{% endfor %}
{action_respond_info(out|join("\n"))}
#####################################################################
# Menu
#####################################################################
[include menu/menu.cfg]
@lhess
Copy link
Author

lhess commented Feb 11, 2023

... but I cannot seem to get the SD card reader on the display to work. I would appreciate any advice, as I am really new to all of this.

Sorry, never used the SD-Card reader since I am uploading my sliced files directly from my slicer via WIFI

Also, if I directly copy in your config file, I remove the dual z settings as I only have single. I get an error that with the macro's. Its as if they are trying to reference to some other configuration. Am I missing something here? For instance, it gives an error with default_parameter_R. I am assuming the parameters are set in another file?

I think this is due to my bltouch/z_tilt config. Did you try to deactivate z_tilt?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment