Your robot measures the distance across a doorway. When a person walks through, the Ultrasonic Sensor measures a lower distance, and the robot plays the “Morning” sound file.
Select the Star Zone and the Square Zone to create two zones. Adjust the Zone Threshold to detect when someone walks through the doorway. In this case, we have chosen 30 cm. When the sensor value is in the Star Zone (that is above 30 cm), the robot will run the Programming Blocks associated with the Star Zone. When the sensor value is in the Square Zone (that is, below 30 cm), the robot will run the Programming Blocks associated with the Square Zone.

Star Zone

Square Zone

Threshold Value

Select Threshold Zone
Go to the Graph Programming Palette for the Square Zone. Drag a Sound Block into the programming area and select the “Morning” sound file.
What would you expect to happen? Your robot should greet you with “Morning” if it detects you walking through the doorway.