The device for length measurement

The device for length measurement by Sasha Shpecht. It includes an optosensor. When the pointer touchs an object, the pointer goes up. And the sensor state will be FALSE. Then the pointer stops. Here is the program for this model.