[filament_motion_sensor filament]
detection_length: 25.0 #The minimum length of filament pulled through the sensor to trigger a state change on the switch_pin.
extruder: extruder #The name of the extruder section this sensor is associated with.
switch_pin: ^PG12 #The pin on which the switch is connected.
pause_on_runout: True
runout_gcode:
M117 Filament out
_RUNOUT_INFO
[gcode_macro _RUNOUT_INFO]
gcode:
{% if 'filament_motion_sensor filament' in printer.configfile.settings %}
{% set enable = printer['filament_motion_sensor filament'].enabled %}
{% set detect = printer['filament_motion_sensor filament'].filament_detected %}
{action_respond_info("RUNOUT Motion Sensor:
Enabled: %s
Detect Filament: %s" % (enable|lower,detect|lower))}
{% endif %}