Skip to content

Instantly share code, notes, and snippets.

@morningreis
Created April 11, 2024 01:46
Show Gist options
  • Save morningreis/3d310c55c2188e007cc0a734ad5a3bde to your computer and use it in GitHub Desktop.
Save morningreis/3d310c55c2188e007cc0a734ad5a3bde to your computer and use it in GitHub Desktop.
Klipper Emergency Power Cutoff Safety Relay Macro
#####################################################################
# EMERGENCY STOP
#####################################################################
[output_pin safety_relay]
## on heater E1 connector
pin: rpi:gpiochip0/gpio16
pwm: false
value: 1
shutdown_value: 0
[gcode_macro KILL_EXT_HEAT_POWER]
gcode:
SET_PIN pin=safety_relay value=0
[delayed_gcode tempcheck]
initial_duration: 1
gcode:
{% if printer.extruder.temperature > 265 %}
M117 Overtemp!
KILL_EXT_HEAT_POWER
{% endif %}
UPDATE_DELAYED_GCODE ID=tempcheck DURATION=1.
#####################################################################
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment