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
[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}
[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 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 %}
# Rootiest Zippy Klipper config
# Machine directory
[include machine/*.cfg]
# Macros directory
[include macros/*.cfg]
# Led Control
[include ledcontrol.cfg]
[delayed_gcode delayed_printer_off]
initial_duration: 600
gcode:
{% if printer.idle_timeout.state == "Idle" %}
M117 Shutdown
WLED_OFF
POWEROFF
{% endif %}
[gcode_macro POWEROFF]
# X axis
[stepper_x]
step_pin: PC2
dir_pin: PB9
enable_pin: !PC3
microsteps: 16
rotation_distance: 40
endstop_pin: ^PA5
position_min: -4
position_endstop: -4
@rootiest
rootiest / BEGIN_LAYER.cfg
Last active May 13, 2022 09:12
M73 with layer progress
[gcode_macro BEGIN_LAYER]
description: Start a new layer and notify system
gcode:
#Get layer details from Slicer GCode
{% set CUR_LAYER = params.NUM|default(0)|float + 1 %}
{% set NUM_LAYERS = params.COUNT|default(0)|float %}
{% set LAYER_Z = params.ZLAY|default(0)|float %}
SET_GCODE_VARIABLE MACRO=PREP_PRINT VARIABLE=cur_layer VALUE={CUR_LAYER}
@rootiest
rootiest / PREP_PRINT.cfg
Last active February 10, 2025 22:33
SuperSlicer Super Start for Klipper
[gcode_macro PREP_PRINT]
description: Loads and starts the print
variable_x_max: 0
variable_y_max: 0
variable_z_max: 0
variable_nozzle: 0
variable_fila_dia: 0
variable_bed_temp: 0
variable_extruder_temp: 0
variable_chamber_temp: 0
sensor:
- platform: bme680_bsec
temperature:
# Temperature in °C
name: "BME680 Temperature"
id: bme680_temp
sample_rate: lp
filters:
- median
@rootiest
rootiest / zigbee_remote.json
Created July 21, 2021 22:35
Zigbee Remote Controller Node Red Flow
[
{
"id": "37d14000.39407",
"type": "tab",
"label": "Zigbee Remotes",
"disabled": false,
"info": ""
},
{
"id": "5464db46.065df4",