I want to measure the rotation made by port A and port B on the following example. What to know whether its going X or Y or -X or - Y against time. Also I want to measure total rotation made by the motor to calculate the distance. I want robot to write these measurements in its memory.
The port A and B are for the motors. This is not my actual program. I developed a code to solve a maze. My actual program has a start and end condition. I want the read rotation sensor to take readings until the end of the exploration. I don’t know how to link the rotation sensor to my program. If you can please tell me where the rotation sensor goes in the mail look? And also does this rotation sensor need any loop?