Klipper CR10s Pro v2 Config w/BL Touch and Micro Swiss + Minimus

# This file contains pin mappings for the Creality CR-10S Pro V2. To use
# this config, the firmware should be compiled for the AVR atmega2560.

[include fluidd.cfg]
[include Macros.cfg]
#[include adxl.cfg]
[include timelapse.cfg]

[exclude_object]

[bltouch]
sensor_pin: ^PD2
control_pin: PB5
x_offset: -50
y_offset: -3
pin_move_time: 0.4
stow_on_each_sample: False
probe_with_touch_mode: True
samples: 2
sample_retract_dist: 3.0
#speed: 4.0
#Usually you think of the z offset as a negative number as closer, because you baby step down after starting at zero
#this is opposite - this is the probe offset
#Higher the offset, the closer the nozzle will be to the bed
#Lower the offset, the further the nozzle will be from the bed
#take current baby stepped z-offset and multiply by -1 (inverse it's sign) and add it to the current offset to get new offset value
#for example:
#  current z_offset = 1.50 and needed to baby step down -.05 then new value should be 1.55
#  current z_offset = 1.50 and needed to baby step up +.05 then new value should be 1.45
#If you need more squish, increase the offset.
#If the nozzle is too close, lower the offset.
#z_offset = 3.35
z_offset = 3.8

[bed_mesh]
speed: 220
horizontal_move_z: 6
mesh_min: 50,  10
mesh_max: 250, 285
probe_count: 5,5
algorithm: bicubic
fade_start: 1
fade_end: 10

[bed_screws]
screw1: 75,275
screw2: 75,40
screw3: 325,40
screw4: 325,275

[screws_tilt_adjust]
screw1_name: rear left screw
screw1: 75,275

screw2_name: front left screw
screw2: 75,40

screw3_name: front right screw
screw3: 325,40

screw4_name: rear right screw
screw4: 325,275

horizontal_move_z: 10
speed: 50
#screw_thread: CW-M4
screw_thread: CW-M3

;[input_shaper]
;shaper_freq_x: 43.0
;shaper_type_x: mzv
;shaper_freq_y: 28.8
;shaper_type_y: mzv

;[input_shaper]
;shaper_type_y: mzv
;shaper_freq_y: 45.8
;shaper_type_x: 3hump_ei 
;shaper_freq_x: 80.4

#[mcu rpi]
#serial: /tmp/klipper_host_mcu

#[adxl345]
#cs_pin: rpi:None

#[resonance_tester]
#accel_chip: adxl345
#probe_points:
#    155,155,20  # an example

[virtual_sdcard]
path: ~/printer_data/gcodes

[display_status]

[pause_resume]

[stepper_x]
step_pin: PF0
dir_pin: PF1
enable_pin: !PD7
rotation_distance: 40
microsteps: 16
full_steps_per_rotation: 200
endstop_pin: ^PE5
position_endstop: 0
position_min: 0
position_max: 310
homing_speed: 50
homing_retract_dist: 5

[stepper_y]
step_pin: PF6
dir_pin: !PF7
enable_pin: !PF2
rotation_distance: 40
microsteps: 16
full_steps_per_rotation: 200
endstop_pin: ^PJ1
position_endstop: -5
position_min: -5
position_max: 310
homing_speed: 50
homing_retract_dist: 5

[stepper_z]
step_pin: PL3
dir_pin: !PL1
enable_pin: !PK0
rotation_distance: 8
microsteps: 16
full_steps_per_rotation: 200
endstop_pin: probe:z_virtual_endstop
position_min: -15
position_max: 330

[extruder]
step_pin: PA4
dir_pin: PA6
enable_pin: !PA2
rotation_distance: 22.900
microsteps: 16
full_steps_per_rotation: 200
nozzle_diameter: 0.800
filament_diameter: 1.750
max_extrude_only_distance: 500.0
max_extrude_only_velocity: 70.0
max_extrude_only_accel: 1000.0
heater_pin: PB4
sensor_type: EPCOS 100K B57560G104F
sensor_pin: PK5
#control: pid
#pid_Kp: 22.2
#pid_Ki: 1.08
#pid_Kd: 114
min_extrude_temp: 170
min_temp: 5
max_temp: 275
max_extrude_cross_section: 5

[heater_bed]
heater_pin: PH5
sensor_type: EPCOS 100K B57560G104F
sensor_pin: PK6
control: pid
pid_Kp: 690.34
pid_Ki: 111.47
pid_Kd: 1068.83
min_temp: 5
max_temp: 140

[fan]
pin: PH6

[mcu]
serial: /dev/serial/by-id/usb-FTDI_FT232R_USB_UART_AR0JSH3K-if00-port0

[printer]
kinematics: cartesian
max_velocity: 200
max_accel: 1500
max_z_velocity: 10
max_z_accel: 100

[safe_z_home]
#home_xy_position: 177,155
home_xy_position: 205, 158
speed: 80.0
z_hop: 10.0
z_hop_speed: 5.0

[filament_switch_sensor e0_sensor]
switch_pin: PE4
pause_on_runout: False
runout_gcode:
  M600

[respond]
default_type: echo