Datasheet

Page 18· Applied Robotics with the SumoBot
With a couple modifications to Forward100Pulses.bs2 from Activity #1, you'll be ready
to go.
Save Forward100Pulses.bs2 as ForwardLowTimeTest.bs2.
Add a
LowTime constant declaration:
LowTime CON 20
Change the FOR...NEXT loop in the Main Routine to a DO...LOOP, and
substitute the
LowTime constant for the 20 in the PAUSE command's Duration
argument:
DO
PULSOUT ServoLeft, 850
PULSOUT ServoRight, 650
PAUSE LowTime
LOOP
It's important to use new batteries in both SumoBots. It's also best to swap programs and
re-test to make sure that one SumoBot doesn't happen to be slower than the other. This
can be especially common in the classroom, where servos may have been subject do
differing levels of wear and tear over time.
Example Program: ForwardLowTimeTest.bs2
Load fresh alkaline batteries into both SumoBots.
Enter and download ForwardLowTimeTest.bs2 to SumoBot A.
Change the
LowTime CON directive from 20 to 40.
Download the modified program into SumoBot B.
Set them on a flat surface for the race.
Press/release both Reset buttons at the same time to start the race.
Follow the SumoBots for 3 seconds, then press/release the Reset buttons again to
end the race.
Measure the distance each SumoBot traveled, and make a note of it.
Divide the distance by 3 to calculate each SumoBot's speed in distance per
second.
Swap the programs so that SumoBot B now has the program with 20 ms pauses
and SumoBot A has the program with 40 ms pauses.
Repeat the race and measurement.