I've set orbiter filament sensor v2 set up recently.
It has 2 outputs (FS for sensing if filament is present) and FTU (outputs if filament is tangled or filament unload button is pressed).
The set up is slightly more elaborate than just a sensor since both outputs have 2 functions and logic is not straightforward as well. FS output works as expected as in changing state when filament is present or runs out, FTU output only changes state if filament is already present.
I'm running FlySHT36v3 Max toolboard with 124
being board CAN address and connected FS to io1.in
to FTU to io2.in
inputs (taking 5v and ground from same 5 pin connector) and had to use triggers for things to work.
This is a section in config.g
; Filament Sensor
M950 J1 C"^124.io1.in" ; define logical input for filament auto load
M581 P1 T3 S1 R0 ; define trigger for filament auto load triggers trigger3.g
M581 P1 T2 S0 R0 ; define trigger for filament sensing triggers trigger2.g
M950 J2 C"^124.io2.in" ; define logical input for filament unload
M581 P2 T4 S1 R0 ; define trigger for filament auto unload triggers trigger4.g
trigger2.g:
; trigger2.g
if state.status == "processing"
M300 S2000 P100 ; play beep sound
M291 P"Ran out of filament while printing" S0 T3 ; display message
M25
elif state.status == "pausing" || state.status == "paused"
M291 P"Retriggered filament sensor during pause" ; display message
else
M300 S2000 P100 ; play beep sound
M291 P"Ran out of filament" S0 T3 ; display message
trigger3.g:
; trigger3.g
M98 P"0:/macros/filament-load"
trigger4.g:
; trigger4.g
if state.status = "processing"
M300 S2000 P100 ; play beep sound
M291 P"Filament is stuck or filament unload button pressed" S0 T3 ; display message
M25
else
M98 P"0:/macros/filament-unload"
filament-load
and filament-unload
macros will need to be created and populated for this to work but that should be more or less straightforward and more printer-specific than general set up
Hope that helps