R
O B O
Ti p s :
• Use the subprograms you already programmed for the Basic Model for the different directions. As
soon as the program Basic model 2.rpp has loaded you can find the program Basic model 2 and with
it its subprograms in the element group window of ROBO Pro under loaded programs. You can
simply insert these subprograms into your new program.
• For the "light-seeking" subprogram use the Count Loop element. (For a description of this element
please see the ROBO Pro manual).
• In the loop between connection "N" and connection "+1"
you query the phototransistors and count one pulse at
the pulse sensor I1. The loop iterates until the robot has
detected light or has rotated 360°. You simply have to try
out how many loops it takes until the robot has
completed a full rotation. Then enter that value "Z" in the
count loop element.
• A second loop is then programmed in exactly the same
way for the search in the opposite direction.
• If the robot detects light, it stops, and exits the
subprogram.
• Here the complete light-seeking subprogram:
• In the main program you again query the phototransistors and control the motors depending on which
phototransistor has detected the light:
Light at I3 and I4
Light only at I3
Light only at I4
No light detected
• You can achieve the right and left turns by setting different speeds for M1 and M2 with the same
rotational direction. This results in a very smooth driving style.
M
S
O B I L E
E T
Straight Ahead
Turn Right
Turn Left
Stop and return to the light-seeking subprogram
A
B
C T I V I T Y
O O K L E T
GB+USA
Count Loop
4 4
1 1
4 4
1 1