Datasheet

Page 204ยท Applied Robotics with the SumoBot
9. What combination of PULSOUT commands does it take to make the SumoBot
execute a pivot-right turn?
10. In the lookup command review, what value will the
counter variable have to
store to make the
LOOKUP command copy 1580 to the note variable?
11. What constant values were chosen for
Forward, Backward, RotateLeft, and
RotateRight?
12. What variable has to be set to a value before the
Pulse_Servos subroutine is
called?
13. What
PULSOUT commands does maneuver = 3; GOSUB Pulse_Servos
dictate?
14. What are the two kinds of conditions that are typically evaluated while executing
a maneuver?
15. What programming elements are needed for the SumoBot to perform one
maneuver if a sensor condition is detected and evaluate the results, then perform
another maneuver if the results are undesirable?
16. How does responding to a peripheral vision detection differ from responding to a
forward vision detection?
17. What is a reset condition?
18. What is a state?
19. In Figure 4-9, what condition keeps the LED off?
20. In Figure 4-9, what condition maintains the
Blink LED state?
21. How do the
Avoid_Tawara states differ from other states?
22. How can you make a program start in the beginning of its Main Routine loop?
23. In TestSumoWrestler.bs2, if the front right and front left QTIs detect the white
tawara line at the same instant, what will happen?
Exercises
1. Write routines for ServoControlExample.bs2 that make the SumoBot curve left
and then curve right.
2. Write a routine that tests all the maneuvers you added to
ServoControlWithLookup.bs2 in the Your Turn section.
3. Write a routine for FrontAndSideIrNavigation.bs2 that makes the SumoBot turn
slowly in place until it finds an object to go after.
4. Draw a hybrid state machine diagram for the Main Routine in Activity #5.