27404 Parallax Inc, 27404 Datasheet - Page 97

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 - TestFrequencyResponse.bs2
' This program can be used with objects at varying distances to determine
' which frequencies make the SumoBot more nearsighted or farsighted.
' {$STAMP BS2}
' {$PBASIC 2.5}
' -----[ I/O Definitions ]---------------------------------------------------
IrLedLF
IrSenseLF
IrLedRF
IrSenseRF
' -----[ Variables ]----------------------------------------------------------
irLF
irRF
frequency
If zero "yes" readings appear, move the SumoBot 5 cm closer to the wall. If
several "yes" readings appear, move the SumoBot 5 cm farther from the wall.
Press and release the Reset button to refresh the Debug Terminal.
Repeat until you find the distance threshold between no object detections and a
few object detections at the most sensitive frequencies.
Move the SumoBot closer in 5 cm increments, testing the frequency response
between each move.
Take notes and make an order of which frequencies can be used for closer and
farther objects.
Repeat this experiment with a SumoBot opponent across the ring.
Keep moving the SumoBot closer in 5 cm increments, and track which
frequencies detect it at which distances.
Selecting a frequency to use will depend on the location of the competition ring.
onlookers stay more than 1 m away from the outside of the ring and IR detectors aren't
seeing the floor outside the ring, choose the most sensitive frequency. If onlookers are likely
to be only 0.5 m outside the ring, or the object detectors see the floor's reflection, choose a
compromise frequency that will be less likely to detect the floor or onlookers, but still pretty
likely to detect its opponent.
You may also want to consider adding extra distance sensors, such as the Parallax Ping)))
Ultrasonic Sensor.
SumoBot decide whether it's viewing an onlooker or its opponent.
VAR
VAR
VAR
PIN
PIN
PIN
PIN
Bit
Bit
Word
4
11
15
14
You can use its distance measurement capabilities to help your
' 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
' State of Left Front IR
' State of Right Front IR
' Stores Frequencies
If

Related parts for 27404