################################################################################
# Board: MKS Robin Nano v1.1 (Flying Bear Reborn 2.0) / MKS Robin Nano v1.3 / MKS Robin Nano-S v1.3
# Printer: Flying Bear Ghost 5
# Config by ODUCCEU
################################################################################

# Documentation
# https://www.klipper3d.org/Config_Reference.html

# Rename this file to 'printer.cfg'.
# Enable proper 'Control board' in 'Included configs' section.

# It is recommended that you follow these steps to properly calibrate your printer:
# 1) Sanity check and PID Tuning: https://www.klipper3d.org/Config_checks.html
# 2) Skew Correction: https://www.klipper3d.org/skew_correction.html
# 3) Resonance Compensation: https://www.klipper3d.org/Resonance_Compensation.html
# 4) Pressure Advance: https://www.klipper3d.org/Pressure_Advance.html

################################################################################
# Included configs
################################################################################

# Duplicate parameters in included config files will override each other.
# In this case, each next included file overwrites the previous one in the list.
# 'printer.cfg' takes precedence over other included files.
# Try to avoid changing the default files by adding or changing parameters in 'printer.cfg' below.
# This does not apply to commented out parameters.

## Control board ###############################################################
# THERE CAN BE ONLY ONE!
[include board/mks-rn-11.cfg]                                                   # MKS Robin Nano v1.1 https://github.com/oducceu/klipper_configs/blob/master/images/mks-rn-11.jpg
# [include board/mks-rn-13.cfg]                                                   # MKS Robin Nano v1.3 https://github.com/oducceu/klipper_configs/blob/master/images/mks-rn-13.png
# [include board/mks-rn-s-13.cfg]                                                 # MKS Robin Nano-S v1.3 https://github.com/oducceu/klipper_configs/blob/master/images/mks-rn-s-13.png
# [include board/mks-rn-s-13-E-on-5.cfg]                                          # MKS Robin Nano-S v1.3 with extruder plugged to E1 https://github.com/oducceu/klipper_configs/blob/master/images/mks-rn-s-13-E-on-5.png

## Base configuration ##########################################################
[include printer/fb-ghost5.cfg]

## Drivers #####################################################################
# [include printer/tmc2225.cfg]
# [include printer/tmc2209_uart_mks_rn.cfg]                                       # enable if using TMC drivers via UART on MKS Robin Nano

## Base macros #################################################################
[include macros/macros.cfg]

## Additional hardware #########################################################
# [include printer/fb-ghost5-bltouch.cfg]                                         # disable 'position_endstop' in [stepper_z] section
# [include printer/rpi_mcu.cfg]                                                   # enable ONLY after setting Pi as MCU https://www.klipper3d.org/RPi_microcontroller.html
# [include printer/accelerometer.cfg]                                             # requires "rpi.cfg"

################################################################################
# X, Y, Z
################################################################################

[stepper_x]
homing_speed: 150

[stepper_y]
homing_speed: 150

[stepper_z]
position_endstop: 0.5                                                           # disable if using BLTouch to use 'probe:z_virtual_endstop'

################################################################################
# E0, HB
################################################################################

[extruder]
rotation_distance: 7.600                                                        # CAUTION! Calibrate using https://www.klipper3d.org/Rotation_Distance.html
nozzle_diameter: 0.400
pressure_advance: 0.000                                                         # CAUTION! Calibrate using https://www.klipper3d.org/Pressure_Advance.html
control: pid                                                                    # CAUTION! Calibrate using PID_CALIBRATE https://www.klipper3d.org/G-Codes.html#extended-g-code-commands
pid_Kp: 30.891
pid_Ki: 2.542
pid_Kd: 93.830
# min_extrude_temp: 0                                                           # allow Cold Extrusion for extruder steps calibration

[heater_bed]
control: pid                                                                    # CAUTION! Calibrate using PID_CALIBRATE https://www.klipper3d.org/G-Codes.html#extended-g-code-commands
pid_Kp: 63.104
pid_Ki: 2.350
pid_Kd: 423.586

################################################################################
# Printer
################################################################################

[mcu]
# serial: /dev/ttyAMA0                                                          # enable if connected via UART1 on Pi3/PiZ
# serial: /dev/ttyAMA1                                                          # enable if connected via UART5 on Pi4

[printer]
max_velocity: 150
max_accel: 3000
max_accel_to_decel: 2000

################################################################################
# Bed leveling
################################################################################

[bed_screws]
screw5: 127.5,105
screw5_name: center virtual screw

################################################################################
# Resonance compensation
################################################################################

[input_shaper]

################################################################################
