Download presentation
Presentation is loading. Please wait.
Published byMadison Henderson Modified over 8 years ago
1
Obstacle Detection
2
In the previous program the robot moves forward and then checks for something in the way. As we observed it only checks for things after it moves forward not all the time.
3
The robot should move if nothing is in the way and stop if there is checking constantly for obstacles.
4
Obstacle Detection Program Using a Switch Block
5
How the Ultrasonic Switch Block Works
7
The Sensor Value is greater than the switches compared value. The distance is above the threshold. The object is far from the robot.
8
How the Ultrasonic Switch Block Works The Sensor Value is less than the switches compared value. The distance is below the threshold. The object is near the robot.
9
Ultrasonic Sensor Block Details
10
Stop Motors Block Details
11
Move Forward Motor Block Details
12
Loop Block Details
13
Drag the Switch Block Into the Loop Block
14
Stop Motors After 4 Rotations
15
Test the robot to see if it keeps moving as long as nothing is in the way and stops if there is. Try placing the object in front of the robot at different times during the program to make sure the robot is checking constantly for obstacles.
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.