Now we will take our time and look at the wait block, when waiting for something to happen with the EV3 Ultrasonic sensor. There are similarities with the settings of the wait block in the other modes / sensors, but there are also few new settings.

To access the full video please subscribe to FLLCasts.com
- #942
- 17 Aug 2018
- LEGO MINDSTORMS, LEGO MINDSTORMS EV3
- Learn At Home, Sensors, EV3, STEM, Programming, Ultrasonic Sensor, Classes with students
From the drop down menu of the wait block we select Ultrasonic Sensor. Then we choose "Compare" and then "Distance Centimeters".
If you preffer working with inches, just select "Distance Inches" instead. There is no difference between the settings of the two, but for simplicity here we will be showing how to work with the centimeters mode only.
The function of the Ultrasonic sensor is to measure the distance to objects. By default the ultrasonic sensor connects at port №4.
Choosing the measured distance threshold-value the robot should wait for
From the first dropdown menu we choose whether the robot to react at a distance:
- equal to 50 cm (=);
- different than 50 cm (≠);
- longer than 50 cm (>);
- longer than or equal to 50 cm (≥);
- shorter than 50 cm (<);
- shorter than or equal to 50 cm (≤).
Avoid the "equal to" option ( i.e. "=") as usually the robot passes the respective value too fast and fails to detect it and react as programmed.
In the example shown on the picture the value is set to 50 cm, but the sensor can detect distance between 3,01 cm and 255 cm.
Some information about metric units
Remember that 1 inch = 2,54 cm
A possible mistake is to forget to change inches to centimeters. This leads to giving incorrect instructions to the sensor which results in a failure of the program. The reason is that 10 inches are equal to 25 centimeters which is 2.5 times greater distance!
Courses and lessons with this Tutorial
This Tutorial is used in the following courses and lessons

Robotics with LEGO - Level 1.0 - Adventure in Space
The first level of the Robotics with LEGO curriculum for students in fifth to twelfth grades.
Various constructions with robots are built. Learn how to control the motors so that the robot navigates around the Moon and Earth in various ways. Getting to know the first two sensors. The robot can feel its surroundings with the help of the Touch sensor and avoid obstacles.
The Ultrasonic distance sensor can help the robot avoid obstacles. Students work with concepts like loop, degrees and medium motor. Robots can now do two different actions at the same time - while solving missions on a field, the third motor clears detected obstacles.
- 126
- 123:52
- 150

Lesson 5 - Ultrasonic sensor
Remember to provide feedback to students regularly. It's important to give structured feedback in the form of a grade. Today, you'll need to grade your students following this article.
- 9
- 5
- 4
- 3d_rotation 1

Robotics with LEGO - Level 4.0 - Kinesthetic and Memory Game (in development)
The seventh level of the Robotics with LEGO curriculum for students in sixth or seventh grade.
In this level, student develop a memory training game. The player must remember series of actions like press a button, shake a pole, pull a lever, show one of many colors. In order to program the game, students use many variables and modify their states. Students create their own custom sounds and images, in order to reflect their own personality in the game. In the end of the level, the game stores top scores even after a full shut down with the help of text files.
- 59
- 2:58
- 200

Remember how to work with the ultrasonic sensor
The EV3 Ultrasonic sensor is used to measure distance. We can use the sensor to detect whether there is a wall or some other solid object ahead and how far it is. But to master it usage, first we should know how does it work
- 3
- 0
- 0
- 3d_rotation 0

Level A2. "Space exploration". Robotics with LEGO
The second level of the Robotics with LEGO curriculum for students in second, third or fourth grades.
A new sensor is introduced - the Ultrasonic distance sensor can help the robot avoid obstacles. Students work with new concepts like loop, degrees and medium motor. Robots can now do two different actions at the same time - while solving missions on a field, the third motor clears detected obstacles. The first robot with chain-treads is built.
- 63
- 3:02
- 117

Lesson 4 - Ultrasonic sensor
Introduction
As you have already seen from the title, today’s lesson will be about ultrasound. Prepare to have a discussion with your teacher.
- What is ultrasound?
- What are the applications of ultrasound?
- Is it possible for robots to navigate using ultrasound?
- How bats see in dark?
Let's build a bat!
- 5
- 3
- 3
- 3d_rotation 1