Help with connecting the optical limit switches

I want to use optical end caps, but they have an inverted signal. When connected, the motors do not move. How do I correct the code so that the motors correctly perceive the limit switches?

Hi Sergey,
In Arduino sketch for rotator change DEFAULT_HOME_STATE from LOW to HIGH.
Hope this helps.
Steve
VK4SMC

thank you, everything worked out! Can I ask you another question? How can a home position be made with a negative elevation? I want the antenna to fold down when not in use.

Hi Sergey,
I am glad it works. Well done.
As for negative elevation, I do not know.
Someone else may be able to help.
Steve