Improved accuracy of optical distance sensor based on artificial neural network applied to real-time systems