Datasheet
Page 186· Applied Robotics with the SumoBot
ACTIVITY #6: FULLY FUNCTIONAL SUMO EXAMPLE PROGRAMS
This activity features two fully functional SumoBot example programs. While they both
do the same things; they are organized a little differently. The first is simply a
combination of the example programs, mainly from this chapter. The second has the
code for each state moved to subroutines.
First Sumo Program - Navigation Code in Main Routine
This first example program followed the same steps used in Chapter 2, Activity #6 for
integrating programs. The three programs that were combined were:
• SearchPatternAndAvoidTawara.bs2 from Activity #6 in this chapter.
• FrontAndSideIrNavigation.bs2 from Activity #3 in this chapter.
• TestResetButton.bs2 from Chapter 2, Activity #2.
Example Program: TestSumoWrestler.bs2
Did you skip ahead to get here? If you skipped any thing in Chapter 3 or 4, go back
and do it now.
The programs that follow are dependent upon the sensor circuits built, tested and calibrated
in the previous activities in Chapter 3 and 4.
√ Pick a sumo start card from Activity #3, Figure 4-7.
√ Download TestSumoWrestler.bs2 to one SumoBot A and place it in the practice
ring in position A.
√ Save TestSumoWrestler.bs2 as MySumoWrestler.bs2.
√ Incorporate your search pattern into the Main Routine.
√ Download that program to SumoBot B.
√ Place it in the practice ring in position B.
√ Press/release both SumoBots' Reset buttons simultaneously.
√ Fine tune the MySumoWrestler.bs2 program for victory.
√ After enough tests to determine the probability of victory, make sure to repeat
the test with the programs swapped. SumoBot A gets SumoBot B's program and
vice versa.