I connected the motion/tangle sensor to the PA9 pin on the toolhead and runout to the stock port on the mainboard. Then I added the following code to my printer.cfg
[filament_motion_sensor encoder_sensor]
switch_pin: ^!extra_mcu:PA9 # motion sensor IO is ^!extra_mcu:PA9
detection_length: 4.88 # accuracy of motion sensor 2.88mm
extruder: extruder
pause_on_runout: True
runout_gcode:
#PAUSE # [pause_resume] is required in printer.cfg
M117 Filament encoder runout
insert_gcode:
M117 Filament encoder inserted
You will need to change the plug over to a jst 1.25mm
Black = Yellow
Green = White
Now both sensors work as intended.