Optical length sensor using mouse board.