27404 Parallax Inc, 27404 Datasheet - Page 163

COMPETITION RING FOR SUMOBOT

27404

Manufacturer Part Number
27404
Description
COMPETITION RING FOR SUMOBOT
Manufacturer
Parallax Inc
Datasheet

Specifications of 27404

Accessory Type
Hobby and Education
Product
Microcontroller Accessories
Lead Free Status / RoHS Status
Contains lead / RoHS non-compliant
For Use With/related Products
SumoBot®
Lead Free Status / RoHS Status
Lead free / RoHS Compliant, Contains lead / RoHS non-compliant
You can test this next example program by positioning the SumoBot so that neither of its
IR object detectors see an object. Then place your hand in front of one of the detectors.
The SumoBot should rotate toward your hand until both detectors see it. Then it should
lunge forward at your hand. If you remove your hand, the SumoBot will stop and wait.
That's because the
does is checks the IR detectors.
Example Program: FrontIrNavigation.bs2
Enter, save, and run FrontIrNavigation.bs2.
Place the SumoBot somewhere where any objects its detectors are pointing at
will be more than a couple meters away. If there are objects near the ring,
consider using an
nearsighted.
Place your hand in front of the left IR object detector. The SumoBot should turn
toward your hand, then lunge forward at it.
Remove your hand, the SumoBot should stop moving.
Repeat for the right object detector.
Place your hand in front of both object detectors at the same time, then take it
away again. So long as both
the SumoBot should lunge and stop immediately when you hand disappears from
view.
Wave your hand briefly in front of one of the detectors. The SumoBot should
pivot for between 1/4 and 1/5 of a second before stopping.
Recycling sections and subroutines. This program was built by combining elements from
other programs following the same procedure introduced in Chapter 2, Activity #6. Elements
from the various declarations sections and subroutines were copied from two programs:
SensorsWithTempVariables.bs2 from Chapter 3, Activity #7, and
ServoControlWithLookup.bs2 from Activity #1 in this chapter.
Try incorporating TestResetButton.bs2 from Chapter 2, Activity #3.
program a lot easier to test.
ELSE
ENDIF
GOSUB Read_Object_Detectors
ELSE
condition in the I
IrFreq CON
irLF
directive with a value that makes the SumoBot
F...THEN...ELSIF...ELSE
and
irRF
went from 0 to 1 at the same time,
' No objects detected?
' State = search pattern
statement. All it
It'll make the

Related parts for 27404