Skip to content

Instantly share code, notes, and snippets.

View rootiest's full-sized avatar
:octocat:
Printing printers

Rootiest rootiest

:octocat:
Printing printers
View GitHub Profile
# Rootiest Zippy Klipper config
# Machine directory
[include machine/*.cfg]
# Macros directory
[include macros/*.cfg]
# Led Control
[include ledcontrol.cfg]
[gcode_macro clean_nozzle]
gcode:
SAVE_GCODE_STATE NAME=clean_nozzle_state
G90
G0 Z2 F5000
G0 X116.8 Y354 F10000
{% for wipe in range(8) %}
{% for coordinate in [(81.8,354),(116.8,354)] %}
G0 X{coordinate[0]} Y{coordinate[1] - 0.5 * wipe} Z0 F6000
{% endfor %}
[delayed_gcode wake_extruder]
initial_duration: 5
gcode:
{% set driver_config = printer.configfile.settings['tmc2209 extruder'] %}
{% set RUN_CUR = driver_config.run_current %}
SET_TMC_CURRENT STEPPER=extruder CURRENT={RUN_CUR}
[gcode_macro WAKE_EXTRUDER]
gcode:
{% set driver_config = printer.configfile.settings['tmc2209 extruder'] %}
{% set RUN_CUR = driver_config.run_current %}
SET_TMC_CURRENT STEPPER=extruder CURRENT={RUN_CUR}
[gcode_macro CIRCLE_WIPE]
gcode:
# Adjust these if necessary to fit on your bed
{% set X_MAX = printer.toolhead.axis_maximum.x|default(200)|float %}
{% set Y_MAX = printer.toolhead.axis_maximum.y|default(200)|float %}
{% set X_MIN = printer.toolhead.axis_minimum.x|default(0)|float %}
{% set Y_MIN = printer.toolhead.axis_minimum.y|default(0)|float %}
{% set X_CENTER = ((X_MIN + X_MAX) * 0.5) %}
{% set Y_CENTER = ((Y_MIN + Y_MAX) * 0.5) %}
# Need this to send console messages
[respond]
[filament_switch_sensor runout_sensor]
pause_on_runout: False # This needs to be false to use runout_gcode
runout_gcode:
_filament_runout
insert_gcode:
_filament_insert
switch_pin:P1.26
# This file contains pin mappings for the Creality CR-10 Smart Pro
# with a CR-FDM-v2.5.S1 board.
#
# To use this config, during "make menuconfig" select the STM32F103
# with a "64KiB bootloader" and serial (on USART1 PA10/PA9)
# communication. Enable PA0 GPIO pin on startup.
#
# Flash this firmware on the MCU by copying "out/klipper.bin" to an SD
# card and turning the printer on with the card inserted. The firmware
# filename must end in ".bin" and must not match the last filename
@rootiest
rootiest / shutdown.sh
Last active November 17, 2022 22:28
Shutdown Scheduler for Klipper
#!/bin/bash
sleep 30
shutdown now
[gcode_macro TEST_STATE]
gcode:
{% if printer.idle_timeout.state == "Printing" %}
RESPOND MSG="We are printing"
{% endif %}
RESPOND type=error MSG="State: {printer.idle_timeout.state}"