Lab3: Measuring distance

Lab task

  1. Understand the distance detection code and the measuring principles from the Ultrasonic manual.
  2. Add your code to the distance detection so the robot detects distance in mm and prints the result on the console.
  3. Verify it with A4 paper (210 x 297 mm) for instance!
  4. Using distance detection and movement code program the robot to move at different speeds depending on the detected distance.
  5. If there is time left cooperate with another group to make one robot following the other in a row (perhaps you can add more than one robot).