www.colmac.ie
45
10. Using a defined loop during a program
In order to deal with difficult
90˚
bends similar to those highlighted on the
COLMAC F1
track
shown below where the robot can lose sight of the line, we need to program it to stop and look for
the line if it loses it completely.
This can be accomplished by instructing the robot to firstly stop, then look left and if it does not
find the line there to then look right until it does.
We could program this in a number of ways but we have chosen to use the defined loop commands
as shown in the program on the following page.
Edit the previous program to create the flowchart
shown.