28125 Parallax Inc, 28125 Datasheet - Page 343

TEXT ROBOTICS

28125

Manufacturer Part Number
28125
Description
TEXT ROBOTICS
Manufacturer
Parallax Inc
Datasheet

Specifications of 28125

Title
Robotics with the Boe-Bot
Product
Microcontroller Accessories
Lead Free Status / RoHS Status
Not applicable / Not applicable
Appendix G: Tuning IR Distance Detection
Finding the Right Frequency Sweep Values
Fine tuning the Boe-Bot’s distance detection involves determining which frequency is
most reliable for each zone for each IR pair.
IR Fine Tuning Program
FrequencySweep.bs2 performs a frequency sweep on the IR detector and displays the
data. Although the techniques used are similar to other programs, it has one unique
feature. The BASIC Stamp is programmed to wait for you to press the Enter key.
' -----[ Title ]--------------------------------------------------------------
' Robotics with the Boe-Bot - FrequencySweep.bs2
' Test IR LED/detector response to frequency sweep.
' {$STAMP BS2}
' {$PBASIC 2.5}
' -----[ Variables ]----------------------------------------------------------
crsrPosRow
irFrequency
irDetect
distance
dummy
Point both the IR LEDs and detectors straight forward.
Place the Boe-Bot in front of a wall with a white sheet of paper as the IR target.
Place the Boe-Bot so that its IR LEDs are 2.5 cm away from the paper target.
Make sure the front of the Boe-Bot is facing the paper target. Both IR LEDs and
detectors should be pointed directly at the paper.
Enter and run FrequencySweep.bs2, but do not disconnect the Boe-Bot from the
serial cable.
Note: This appendix features a method of determining the best frequencies for determining
given distances using spreadsheets. This activity takes time and patience, and is only
recommended if your distance sensing is severely out of calibration. It involves collecting
frequency sweep data and using it to determine the most reliable values for detecting
particular distances.
VAR
VAR
VAR
VAR
VAR
Byte
Word
Bit
Nib
crsrPosRow
' Stamp directive.
' PBASIC directive.

Related parts for 28125