I'm doing a project on arduino. I'm using a online simulator to design the circuit. I have a dc motor. How do we measure the rpm,speed at that rpm,distance covered by the motor in a given time. For example,
When motor starts, it starts rotating slowly and gradually increases it's RPM. When it covered a distance of 50 meters, the motor slows down and stops. After 10 seconds, the motor starts again at that 50 meter point and goes to 100 meters point and stops. Like this it stops for every 50m. For this we need to keep track of the distance travelled by motor and control it's speed.
How do I achieve the above working. I have tried alot and verified many tutorials but couldn't understand what to do. Please help me out. (The online simulator I'm using has a L293D motor driver, IR sensor and a ultrasonic distance sensor in it's component list.)