Welcome! Log In Create A New Profile

Advanced

Marlin endstop read

Posted by luismanson 
Marlin endstop read
February 21, 2015 09:08PM
Hello, im looking at the code but could not find (under my limitations) how does marlin evaluate an endstop trigger event. i have modded the classic endstop with an opto switch i had lying arround. the curious bit comes from the fact that while i was recalculating the Z offset i saw the led brightness was proportional to the the opto endstop trigger level (height), yet M119 did not report the event until a few 0.0Xmm lower.

i saw a few lines calling READ
bool y_min_endstop=(READ(Y_MIN_PIN) != Y_MIN_ENDSTOP_INVERTING);

but im failing at see at which level this will be true
Re: Marlin endstop read
February 22, 2015 02:17PM
Endstops are only digitalread. That means it can only read 1 or 0.
Now there are two different switches. NO and NC. So maybe you need to invert that.


Triffid Hunter's Calibration Guide --> X <-- Drill for new Monitor Most important Gcode.
Re: Marlin endstop read
February 22, 2015 03:11PM
thanks Wurstnase it does work, but I was worried since i was not sure if the trigger was a some analog read
Sorry, only registered users may post in this forum.

Click here to login