27404 Parallax Inc, 27404 Datasheet - Page 90

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
The modified Main Routine also necessitates a few smaller changes, like a
declaration for
alarm beeps. The Initialization message in the next example program is also changed, as
are the comments at the beginning of the program.
Example Program: IrInterferenceSniffer.bs2
IrInterferenceSniffer.bs2 sounds the SumoBot's piezospeaker alarm whenever it receives
infrared signals in the neighborhood of 38.5 kHz. This could be from another SumoBot,
a handheld remote that controls a TV, a video recorder, or fluorescent lights with an
interfering ballast.
' -----[ Main Routine ]------------------------------------------------
DO
LOOP
Make sure one of your SumoBots is running TestFrontIrObjectDetectors.bs2.
Disconnect that first SumoBot from the serial cable and set it aside.
Enter and save run IrInterferenceSniffer.bs2.
Download it to the second SumoBot.
Point the first SumoBot's IR LED headlights at the second SumoBot. The
second SumoBot's alarm should sound indicating it has detected IR interference.
Point the first SumoBot away from the second SumoBot, and the alarm should
stop.
Try walking under various fluorescent lights while pointing the second SumoBot
(running IrInterferenceSniffer.bs2) at them. Does its alarm sound? If not, that's
good. If yes, you'll want to keep your SumoBot Competition Ring well away
from those lights, or turn them off.
irLF = ~IrSenseLF
irRF = ~IrSenseRF
IF irLF = 1 OR irRF = 1 THEN
ENDIF
DEBUG "IR interference detected!!!", CR
FOR counter = 1 TO 7
NEXT
FREQOUT LedSpeaker, 50, 4000
PAUSE 50
LedSpeaker
as well as a
counter
' DO...LOOP repeats indefinitely
' Save IR receiver outputs
' Sound alarm if IR detected
' Repeat DO...LOOP
variable for sending a series of rapid
PIN

Related parts for 27404