Hello,

so i am building this new custom printer. Ramps 1.4 and Marlin.
My endstops are optical.
Here my problem:

When i move my axis x or y towards the endstop it doesn't get stopped by the endstop, although the endstops LED turns off when reached. So i can crash the axis slowly with small steps into the stop. But when i want to move it backwards again, away from the endstop it stops moving. So the endstop essentially does its job, But in the wrong direction!
Any ideas what i could change here in the firmware? Or even with the hardware?
I would be glad to get some help.