Missing Object Alarm (Wait for Far)
What does the Wait Block do if you set it to wait for a value Greater Than the Threshold instead of Less Than? Change the Wait Block's "Compare Type" setting to Greater Than (2).
Place an object in front of the robot, and download and run the program. Now, try moving the object and see what happens.
The Wait Block is waiting for an Ultrasonic Value "Greater Than" the Threshold before playing the sound. When the object is removed, the Ultrasonic Sensor's value jumps up because the closest object it can see is now the wall. Since the wall is more than ("greater than") 50 cm away, the Wait Block stops waiting, and the Sound Block plays! |
Sound Sentences
You can have multiple sounds play one after another to form sentences. Try adding a second Sound Block to your program so it says "Object Detected" instead of just "Hello"!
"Object" and "Detected" can be found as separate sound files in the "Information" folder. How would you get the EV3 to say them one after another?
Place the Sound Block one after another makes them run and therefore play their sounds - in order. ![]() |
Sensor Change Mode
In addition to "Comparing" the value of the sensor against the Threshold, the Wait Block can also look at the amount the sensor value has changed since the command started.
The Wait Block ends and the alarm sounds whenever the Ultrasonic Sensor's value has changed by more than 5 centimeters from the time it started Waiting. |
Did you know?
How the Ultrasonic Sensor Works
The Ultrasonic Sensor uses the speed that sound waves travels to measure distance to an object. |