Datasheet

Chapter 5: Debugging and Datalogging ยท Page 251
PAUSE 200 ' Pause 0.2 seconds for reading
#ELSE
PAUSE 50
#ENDIF
RETURN
#ENDIF
Your Turn - Customizing Your SumoBot
The possibilities are endless for increasing your SumoBot's abilities. In personal robotics
club competitions, SumoBots have been sighted with extensive modifications. One
winning competitor used only the SumoBot printed circuit board and made a custom
chassis, plow, and motors and sensors. When adding or substituting sensors, it's a good
idea to use the same procedure this book used for sensors:
(1) Write a small functional program to test the sensors.
(2) Modify the program so that the sensor code is in a subroutine that controls a bit
in the sensors variable. Your subroutine may also need to decide what value
constitutes a 1 or 0 based on a measurement being above or below a threshold.
The subroutine should also make use of the temp and counter variables whenever
possible.
(3) Integrate the Subroutine into your competition code. This may involve
modifying the conditions for various navigation states, or even adding new
navigation states.
(4) Test the SumoBot's performance against another SumoBot in the competition
ring.
(5) Modify SumoWrestlerWithDataLogMode.bs2 so that it logs and displays any
new navigation states, and use the program for trouble-shooting and refining the
SumoBot's performance.
There are lots of sensors that may be useful to your customized SumoBot robot. The
Ping))) Ultrasonic (distance) Sensor (#28015) and the Memsic 2125 Dual Axis
Accelerometer (#28017) are two examples of the many sensors available at
www.parallax.com
. Each sensor page has documentation and example programs.
Another example of a sensor idea is a custom contact sensor that can tell your SumoBot's
BASIC Stamp whether its competitor's plow is above or below its plow. You can then
experiment with writing code for navigation states that take evasive maneuvers.