Sorry I haven't been on for a while. I've been out of it with a big project at work lately.
A couple questions.
Do the optos pull the signal line high or low when interrupted? Same question for the mechanical switch. The mechanical switch may need to have the internal pull-up set if it's not on a daughter board with pull up. Do the optos have an indicator light? Does it light up when interrupted? What do you get when you send M119 to the firmware? It should send back the status of the end-stops.
Some things to try if you haven't already.
Check the cables. Make sure you get continuity pin to pin.
Check the soldering. Inspect the solder connections on the atmega and the endstop headers for cold solder joints.
Stick something in the opto and make sure the +5 is getting all the way to the corresponding ATmega pin.
Send M119. Then stick something in the opto and send M119 to see if the status is updating.
Double check your pins.h against the pinout on the wiki. There was a short time when the published config.h/pins.h had a pin conflict. One of the SD card pins was a duplicate of one of the end-stops.
A couple questions.
Do the optos pull the signal line high or low when interrupted? Same question for the mechanical switch. The mechanical switch may need to have the internal pull-up set if it's not on a daughter board with pull up. Do the optos have an indicator light? Does it light up when interrupted? What do you get when you send M119 to the firmware? It should send back the status of the end-stops.
Some things to try if you haven't already.
Check the cables. Make sure you get continuity pin to pin.
Check the soldering. Inspect the solder connections on the atmega and the endstop headers for cold solder joints.
Stick something in the opto and make sure the +5 is getting all the way to the corresponding ATmega pin.
Send M119. Then stick something in the opto and send M119 to see if the status is updating.
Double check your pins.h against the pinout on the wiki. There was a short time when the published config.h/pins.h had a pin conflict. One of the SD card pins was a duplicate of one of the end-stops.