TXT
Discovery Set
ROBOTICS
32
Task 2: Turning around at the end of the trail and following it
back
Expand your program to include a function, so that when the
robot gets off the trail it turns around and returns.
Programming Tips:
There are several possibilities for correcting the direction. You can stop
one motor and let the other one continue to run or have one motor
rotate opposite the direction of movement. Experiment to determine
which method is better.
Here is our suggested solution:
So! Now your robot can move on visual "rails". The only disadvantage is
that you first have to set it on the rail. We want to change this. The robot
should search for its trail on its own.
Task 3: Finding the trail and following it
Write a "search" subroutine to make the robot search for a black
trail if it does not find one when the program starts. For this
purpose, the robot is to first move in a circle for one time. If it does
not find a trail when it does this it should move straight ahead for a
short distance. As soon as the robot detects a trail, it should follow
it. If this doesn't, the search should start over from the beginning.
After it has moved in a circle 10 times without finding a trail, it
should stop and flash three times.
Programming Tips:
In case you are not exactly on the right trail, here is our suggested
solution:
Trail_searcher_2.rpp
Trail_searcher_3.rpp
Summary of Contents for ROBOTICS ADVANCED
Page 1: ......