ELS08p2&3 – Measure and Speak Distance (EV3)

ELS08p2&3 – Measure and Speak Distance (EV3)

Lego Mindstorms EV3 v 1.2.1 for EV3 Firmware version 1.09H. Also version using Ultrasonic sensor for EV3 Educational.



The robot detects the distance of the closest object to its IR/US sensor. It speaks this distance rounded to the nearest 10cm and also displays the accurate distance on screen. Distance accuracy based on the IR is limited. Accuracy is better if using the ultrasonic sensor version.

Speaks the distance repeatedly:

  • Program path: “ELS08IR/Part2”
  • Program path for US sensor: “ELS08US/Part2”

To speak the distance on a button press (top left remote button with IR, or left button on robot for US):

  • Program path: “ELS08IR/Part3”
  • Program path for US sensor: “ELS08US/Part3”

file: EV3_ELS08.zip (Download) using InfraRed or Ultrasonic sensor in port 4.

About andy

Dr. Andy Burton is a research fellow in the ISRG.
This entry was posted in ev3. Bookmark the permalink.