Note: It is recommended to use I/O port #7 for the Bltouch, but you can also use #4 or #5.
Optical End Stop  Duet 3 Pin
V 3.3v
S io0.in
G GND
   
    End Stops are to be connected to the Inputs and Output Ports of the Duet 3
The Corresponding I/O pin needs to be selected.
Select [io
X.in] since these sensor are Active High no need for pull up resistor (Sensor send 3.3V to I/O when triggered.)