# Klipper Installation

:::warning
TODO (as you can tell)

:::

## Required Components

* Any Linux based computer capable of running Kalico
  * Recommended SBCs: OrangePi Zero 3, Raspberry Pi 4 / 5
  * **__STRONGLY DISCOURAGED__** SBCs: Raspberry Pi Zero 2 (the USB port will randomly stop working)
* An micro SD card (or whatever is used for your SBC)
  * Ideally flashed with the console-only version of your Linux distribution of choice
    * Raspberry Pi: [Raspberry Pi OS Lite](https://www.raspberrypi.com/software/operating-systems/)
    * Orange Pi Zero 3: [Armbian Server / CLI](https://www.armbian.com/orange-pi-zero-3/)

## Installation

* Install [KIAUH](https://github.com/dw-0/kiauh) (Klipper Installation and Update Helper)
  * ```bash
    sudo apt-get update && sudo apt-get install git -y
    cd ~ && git clone https://github.com/dw-0/kiauh.git
    
    cat <<EOF >~/kiauh/kiauh.cfg
    [kiauh]
    backup_before_update: False
    
    [klipper]
    repositories:
        https://github.com/KalicoCrew/kalico,main
        https://github.com/Klipper3d/klipper,master
    
    [moonraker]
    optional_speedups: True
    repositories:
        https://github.com/Arksine/moonraker, master
    
    [mainsail]
    port: 80
    unstable_releases: False
    
    [fluidd]
    port: 80
    unstable_releases: False
    EOF
    
    ~/kiauh/kiauh.sh
    # Install Klipper (for one instance), Moonraker, Crowsnest and Mainsail (accept the default configs)
    ```

## Tuning

### Input Shaper

> ⚠️: TODO / Incomplete

When using the our configuration, the LIS2DW accelerometer on the stock toolhead board is already configured. You just need to follow [Kalicos manual](https://docs.kalico.gg/Measuring_Resonances.html) for actually running the resonance tester and configuring those values.

### Automatic Motor Tuning (inaccurate but easy)

> ⚠️: TODO / Incomplete

Used module: <https://github.com/andrewmcgr/klipper_tmc_autotune>

### Automatic Motor Tuning (accurate but slow)

> ⚠️: TODO / Incomplete

Used module: <https://github.com/MRX8024/chopper-resonance-tuner>