Schmitt-triggered proximity detectors on a milled PCB

Auto leveling is key to precise PCB milling. I wrote some open-source software that makes it possible to do auto-leveling on a CNC USB Controller-based machine like my chinese 3020 CNC. This software controls the actual control software so that it starts probing a circuit board in a grid-like manner, after which it can compensate for any misalignment and curvature in the GCode.