Macros as they run on the printer (Voron 2.4 + AFC Box Turtle + Blobifier + Beacon + bd_pressure + bdwidth + iHeater), the Klipper modules they need (xy_drift, bdwidth_status, bdpressure_check), MCU firmware update scripts, install.sh with Moonraker update manager support, and READMEs. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
41 lines
1.0 KiB
INI
41 lines
1.0 KiB
INI
[gcode_button am312]
|
|
pin: !PC0
|
|
press_gcode:
|
|
_motion_detected
|
|
|
|
[gcode_macro _motion_detected]
|
|
description: Motion sensor triggered
|
|
gcode:
|
|
{% set printing = printer.print_stats.state == "printing" %}
|
|
|
|
# RESPOND MSG="AM312: Motion detected"
|
|
|
|
{% if printing %}
|
|
# RESPOND MSG="AM312: Printer is printing -> light ON (100%)"
|
|
SET_PIN PIN=caselight VALUE=1.0
|
|
_set_nozzle_leds_on
|
|
{% else %}
|
|
# RESPOND MSG="AM312: Printer idle -> light ON (10%)"
|
|
SET_PIN PIN=caselight VALUE=0.1
|
|
_set_nozzle_leds_off
|
|
{% endif %}
|
|
|
|
# RESPOND MSG="AM312: Resetting timeout to 30 seconds"
|
|
UPDATE_DELAYED_GCODE ID=_motion_timeout DURATION=30
|
|
|
|
|
|
[delayed_gcode _motion_timeout]
|
|
gcode:
|
|
{% set printing = printer.print_stats.state == "printing" %}
|
|
|
|
# RESPOND MSG="AM312: Timeout reached, no motion"
|
|
|
|
{% if printing %}
|
|
# RESPOND MSG="AM312: Printing -> dim light to 10%"
|
|
SET_PIN PIN=caselight VALUE=0.1
|
|
{% else %}
|
|
# RESPOND MSG="AM312: Idle -> light OFF"
|
|
SET_PIN PIN=caselight VALUE=0.0
|
|
{% endif %}
|
|
_set_nozzle_leds_off
|