I’d like to detect these limit switch/opto sensor by DIO channel on Arduino.
But I’m not sure how to connect them to Arduino.
I connected it as the first attached figure.
Is this connection okay to detect the DI signal?
And I wonder if I have to add a resistor to protect the Arduino board?
What if I connected several limit switches at the same time, as the second attached figure?
I connected it as the third attached figure.
Is this connection okay? I’ve tried but failed to get the signal when the light blocked.