Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # For the ZNP Robin Nano DW v2.2 board:
- # - Compile with the processor model STM32F401.
- # - Select the 32KiB bootloader,
- # - Select (Serial (on # USART1 PA10/PA9) for the communication interface.
- # - Select (Serial (on # USART2 PA3/PA2) if you want to use the serial UART pins on J17 (wifi section)
- # Note that the "make flash" command does not work with ZNP Robin boards. After running "make", run the following command:
- # cp out/klipper.bin out/ZNP_ROBIN_NANO.bin
- #
- # Copy the file out/ZNP_ROBIN_NANO.bin to an SD card and then restart the printer with that SD card.
- # See docs/Config_Reference.md for a description of parameters.
- #[include timelapse.cfg]
- [exclude_object]
- [virtual_sdcard]
- path: /home/biqu/printer_data/gcodes
- [include accessibility.cfg]
- [include main_macro.cfg]
- [include testing.cfg]
- [include pause_resume_cancel.cfg]
- [gcode_macro LOAD_FILAMENT]
- variable_load_distance: 40 # Distance to load filament into the extruder
- variable_purge_distance: 50 # Distance to purge filament after loading
- variable_nozzle_preheat_temp: 195 # Default preheat temperature for the nozzle
- variable_turn_off_extruder: True # Option to turn off the extruder after loading (True/False)
- gcode:
- # Parameters and settings
- {% set load_speed = params.LOAD_SPEED|default(600) %} # Speed in mm/min for fast filament loading
- {% set purge_speed = params.PURGE_SPEED|default(300) %} # Speed in mm/min for purging filament
- {% set target_temp = params.TARGET_TEMP|default(nozzle_preheat_temp) %} # Target temperature for the nozzle
- {% set min_temp = params.MIN_TEMP|default(180) %} # Minimum safe temperature for extrusion
- # Save current state of the printer
- SAVE_GCODE_STATE NAME=load_state
- # Heat directly to the target temperature if it's above the minimum temperature
- {% if target_temp >= min_temp %}
- M104 S{target_temp} ; Set extruder to target temperature
- M109 S{target_temp} ; Wait for extruder to reach target temperature
- {% else %}
- # Heat to minimum temperature first if target is too low
- M104 S{min_temp} ; Set extruder to safe minimum temperature
- M109 S{min_temp} ; Wait for extruder to reach safe minimum temperature
- {% endif %}
- # Begin filament loading process
- G91 ; Set relative positioning for extrusion
- G92 E0 ; Reset extruder position
- G1 E{load_distance} F{load_speed} ; Load filament at the specified loading speed
- G1 E{purge_distance} F{purge_speed} ; Purge filament at the slower purging speed
- # Optionally turn off the extruder heater after loading
- {% if turn_off_extruder %}
- M104 S0 ; Turn off extruder heater
- {% endif %}
- # Restore previous state of the printer
- G90 ; Restore absolute positioning
- RESTORE_GCODE_STATE NAME=load_state
- # Completion message
- M117 Filament load complete
- [gcode_macro UNLOAD_FILAMENT]
- variable_unload_distance: 100 # Distance to retract filament from the extruder
- variable_nozzle_preheat_temp: 195 # Default preheat temperature for unloading
- variable_turn_off_extruder: True # Option to turn off the extruder after unloading (True/False)
- gcode:
- # Parameters and settings
- {% set retract_speed = params.RETRACT_SPEED|default(600) %} # Speed for retracting filament
- {% set target_temp = params.TARGET_TEMP|default(nozzle_preheat_temp) %} # Target temperature for the nozzle
- {% set min_temp = params.MIN_TEMP|default(180) %} # Minimum safe temperature for extrusion
- # Save current state of the printer
- SAVE_GCODE_STATE NAME=unload_state
- # Heat the nozzle to the target temperature if required
- {% if printer.extruder.temperature < target_temp %}
- # Ensure the nozzle is heated to the target temperature or at least the minimum safe temperature
- {% if target_temp >= min_temp %}
- M104 S{target_temp} ; Set extruder to target temperature
- M109 S{target_temp} ; Wait for extruder to reach target temperature
- {% else %}
- M104 S{min_temp} ; Set extruder to safe minimum temperature
- M109 S{min_temp} ; Wait for extruder to reach safe minimum temperature
- {% endif %}
- {% endif %}
- # Begin filament unloading process
- G91 ; Set relative positioning for extrusion
- G92 E0 ; Reset extruder position
- G1 E-{unload_distance} F{retract_speed} ; Retract filament at the specified speed
- # Optionally turn off the extruder heater after unloading
- {% if turn_off_extruder %}
- M104 S0 ; Turn off extruder heater
- {% endif %}
- # Restore previous state of the printer
- G90 ; Restore absolute positioning
- RESTORE_GCODE_STATE NAME=unload_state
- # Completion message
- M117 Filament unload complete
- [pause_resume]
- [display_status]
- # [adxl345]
- # cs_pin: MCU:None
- # spi_Bus: sidev1.1
- # axes_ma: x,y,z
- # [resonance_tester]
- # accel_chip: aadxl345
- # probe_points: 0,0,0
- [gcode_macro CANCEL_PRINT]
- description: Cancel the actual running print
- rename_existing: CANCEL_PRINT_BASE
- gcode:
- TURN_OFF_HEATERS
- CANCEL_PRINT_BASE
- [gcode_macro PAUSE]
- description: Pause the actual running print
- rename_existing: PAUSE_BASE
- # change this if you need more or less extrusion
- variable_extrude: 1.0
- gcode:
- ##### read E from pause macro #####
- {% set E = printer["gcode_macro PAUSE"].extrude|float %}
- ##### set park positon for x and y #####
- # default is your max posion from your printer.cfg
- {% set x_park = printer.toolhead.axis_maximum.x|float - 5.0 %}
- {% set y_park = printer.toolhead.axis_maximum.y|float - 5.0 %}
- ##### calculate save lift position #####
- {% set max_z = printer.toolhead.axis_maximum.z|float %}
- {% set act_z = printer.toolhead.position.z|float %}
- {% if act_z < (max_z - 2.0) %}
- {% set z_safe = 2.0 %}
- {% else %}
- {% set z_safe = max_z - act_z %}
- {% endif %}
- ##### end of definitions #####
- PAUSE_BASE
- G91
- {% if printer.extruder.can_extrude|lower == 'true' %}
- G1 E-{E} F2100
- {% else %}
- {action_respond_info("Extruder not hot enough")}
- {% endif %}
- {% if "xyz" in printer.toolhead.homed_axes %}
- G1 Z{z_safe} F900
- G90
- G1 X{x_park} Y{y_park} F6000
- {% else %}
- {action_respond_info("Printer not homed")}
- {% endif %}
- [gcode_macro RESUME]
- description: Resume the actual running print
- rename_existing: RESUME_BASE
- gcode:
- ##### read E from pause macro #####
- {% set E = printer["gcode_macro PAUSE"].extrude|float %}
- #### get VELOCITY parameter if specified ####
- {% if 'VELOCITY' in params|upper %}
- {% set get_params = ('VELOCITY=' + params.VELOCITY) %}
- {%else %}
- {% set get_params = "" %}
- {% endif %}
- ##### end of definitions #####
- {% if printer.extruder.can_extrude|lower == 'true' %}
- G91
- G1 E{E} F2100
- {% else %}
- {action_respond_info("Extruder not hot enough")}
- {% endif %}
- RESUME_BASE {get_params}
- [mcu]
- serial: /dev/ttyUSB0
- # serial: /tmp/klipper_host_mcu
- restart_method: command
- [led LED_Light]
- white_pin: PB9
- initial_white: 1.0
- #[output_pin LED_Light] #toggle for LED Light - use this instead of [LED] for sonic pad
- #Pin: PB9
- #cycle_time: 0.01
- #pwm: true
- #value: 1
- [printer]
- kinematics: cartesian
- max_velocity: 500
- max_accel: 3000
- max_z_velocity: 15
- max_z_accel: 100
- square_corner_velocity: 5
- # Use those higher values just to configure Input Shaper
- #max_accel: 10000
- #max_accel_to_decel: 10000
- [stepper_x]
- step_pin: !PC12
- dir_pin: PB3
- enable_pin: !PD2
- microsteps: 16
- rotation_distance: 40
- endstop_pin: PA13
- position_endstop: -6.0
- position_min: -6
- position_max: 235
- homing_speed: 50
- [stepper_y]
- step_pin: PC11
- dir_pin: PA15
- enable_pin: !PC10
- microsteps: 16
- rotation_distance: 40
- endstop_pin: PB8
- position_endstop: 0
- position_max: 235
- homing_speed: 50
- [stepper_z]
- step_pin: PC7
- dir_pin: !PC9
- enable_pin: !PC8
- rotation_distance: 8
- microsteps: 16
- position_min: -2
- position_max: 280
- endstop_pin: probe:z_virtual_endstop # Use Z- as endstop
- homing_speed: 5.0
- [extruder]
- max_extrude_only_distance: 100.0
- step_pin: PB10
- dir_pin: PB1
- enable_pin: !PC6
- microsteps: 16
- nozzle_diameter: 0.400
- filament_diameter: 1.750
- heater_pin: PA6
- sensor_type: EPCOS 100K B57560G104F
- sensor_pin: PC1
- min_temp: 0
- max_temp: 250
- # Calibrate E-Steps https://www.klipper3d.org/Rotation_Distance.html#calibrating-rotation_distance-on-extruders
- rotation_distance: 6.9
- # Calibrate PID: https://www.klipper3d.org/Config_checks.html#calibrate-pid-settings
- # - Example: PID_CALIBRATE HEATER=extruder TARGET=200
- control = pid
- pid_kp = 30.356
- pid_ki = 1.857
- pid_kd = 124.081
- # Calibrate PA: https://www.klipper3d.org/Pressure_Advance.html
- #pressure_advance = 0.600
- [heater_bed]
- heater_pin: PA5
- sensor_type: EPCOS 100K B57560G104F
- sensor_pin: PC0
- pwm_cycle_time: 0.020 # set to 0.0166 if your grid runs on 60Hz to fix lights flickering
- max_temp: 110
- min_temp: 0
- # Calibrate PID: https://www.klipper3d.org/Config_checks.html#calibrate-pid-settings
- # - Example: PID_CALIBRATE HEATER=heater_bed TARGET=60
- control = pid
- pid_kp = 64.230
- pid_ki = 0.723
- pid_kd = 1425.905
- [heater_fan hotend_fan]
- pin: PB0
- heater: extruder
- heater_temp: 50.0
- [fan]
- pin: PA7
- [force_move]
- enable_force_move: True
- [safe_z_home]
- home_xy_position: 117.5, 117.5
- z_hop: 10
- [probe]
- pin: ^PA8
- speed: 5
- lift_speed: 15
- samples: 1
- x_offset: -28
- y_offset: 20
- # Calibrate probe: https://www.klipper3d.org/Bed_Level.html
- # - Example: PROBE_CALIBRATE, then adjust with TESTZ Z=+/-X
- #z_offset = -0.010
- [filament_switch_sensor filament_sensor]
- pause_on_runout: true
- switch_pin: PB4
- [bed_mesh]
- speed: 300
- horizontal_move_z: 5.0
- mesh_min: 30,30
- mesh_max: 205,205
- probe_count: 6,6
- algorithm: bicubic
- fade_start: 1
- fade_end: 10
- fade_target: 0
- [input_shaper]
- # Calibrate IS: https://www.klipper3d.org/Resonance_Compensation.html
- shaper_type_y = mzv
- shaper_freq_y = 38.2
- shaper_type_x = ei
- shaper_freq_x = 79.6
- [temperature_sensor raspberry_pi]
- sensor_type: temperature_host
- #min_temp: 10
- #max_temp: 105
- [temperature_sensor mcu_temp]
- sensor_type: temperature_mcu
- sensor_temperature1: 25
- sensor_adc1: 0.210317
- #min_temp: 0
- #max_temp: 105
- [gcode_macro M420]
- description: Load the current mesh
- gcode:
- BED_MESH_PROFILE LOAD=default
- [gcode_macro G29]
- description: creates automated homing and bed mesh
- gcode:
- G28
- BED_MESH_CALIBRATE
- DATA_SAVE
- #*# <---------------------- SAVE_CONFIG ---------------------->
- #*# DO NOT EDIT THIS BLOCK OR BELOW. The contents are auto-generated.
- #*#
- #*# [probe]
- #*# z_offset = 1.685
- #*#
- #*# [bed_mesh default]
- #*# version = 1
- #*# points =
- #*# 0.280000, 0.372500, 0.345000, 0.342500, 0.257500, 0.230000
- #*# 0.225000, 0.280000, 0.242500, 0.252500, 0.185000, 0.165000
- #*# 0.177500, 0.187500, 0.117500, 0.122500, 0.050000, 0.040000
- #*# 0.097500, 0.100000, 0.025000, 0.035000, -0.012500, 0.000000
- #*# -0.007500, -0.025000, -0.110000, -0.087500, -0.117500, -0.087500
- #*# -0.117500, -0.152500, -0.222500, -0.192500, -0.202500, -0.170000
- #*# tension = 0.2
- #*# min_x = 30.0
- #*# algo = bicubic
- #*# y_count = 6
- #*# mesh_y_pps = 2
- #*# min_y = 30.0
- #*# x_count = 6
- #*# max_y = 205.0
- #*# mesh_x_pps = 2
- #*# max_x = 205.0
Advertisement
Add Comment
Please, Sign In to add comment