Mini Challenge 1: Threshold Values
The Wait - Ultrasoinc Sensor Block uses a "Threshold" to define what it is waiting for. Rather than look for a specific value (like 1cm or 200cm), it sets a "cutoff" value that divides all the possible Ultrasonic Sensor values into two catagories:
|
Can't remember how to control the EV3's LEDs? Go to the LED Feedback Try It from Forward Until Near 3 for more details.
Use multiple waitUntil commands in your program.
Make sure your motor speed is low enough so the robot has time to display the different colors of the Touch LED Sensor.
Mini Challenge 2: Move Until Far
The program in the video above is Forward Until Near, meaning the robot will move forward until it detects a wall or object within the set threshold. Now, perform the opposite. Create a program that makes the robot back away from a wall or object until it is beyond the set threshold.
|
Did you know?
How the Ultrasonic Sensor works