27404 Parallax Inc, 27404 Datasheet - Page 91

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
' -----[ Title ]--------------------------------------------------------------
' Applied Robotics with the SumoBot - IrInterferenceSniffer.bs2
' This program tests for IR interference from other fluorescent lights,
' handheld remotes, video recorders and other SumoBot robots.
' {$STAMP BS2}
' {$PBASIC 2.5}
' -----[ I/O Definitions ]---------------------------------------------------
IrLedLF
IrSenseLF
IrLedRF
IrSenseRF
LedSpeaker
' -----[ Variables ]----------------------------------------------------------
irLF
irRF
counter
' -----[ Initialization ]-----------------------------------------------------
DEBUG CLS, "Checking for IR interference...", CR, CR
' -----[ Main Routine ]-------------------------------------------------------
DO
LOOP
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
Always test for and eliminate sources of IR interference near your SumoBot
Competition Ring.
PIN
PIN
PIN
PIN
PIN
VAR
VAR
VAR
4
11
15
14
5
Bit
Bit
Byte
' Target = BASIC Stamp 2
' Language = PBASIC 2.5
' Left IR LED connected to P4
' Left IR detector to P11
' Right IR LED connected to P15
' Right IR detector to P14
' LED/speaker connected to P5
' State of Left Front IR
' State of Right Front IR
' Loop counting variable
' DO...LOOP repeats indefinitely
' Save IR receiver output

Related parts for 27404