12 |
P a g e
2.
Forever Actions
. This code has a
while True
loop that repeats the actions forever
–
or until you press the
home
button
next to the USB connection.
This code is mainly used in conjunction with the joystick and buttons, or the ultrasonic and line follower sensors,
where the mBot2 will respond to changes in sensor values.
CHALLENGES
3. Place two small objects on the floor at least 1m apart. Drive around these multiple times in a figure of 8. When
you turn use the led’s to indicate your turns.
4. Place a large object on the floor and turn around the object 3 times in a large, smooth circle
.