27403 Parallax Inc, 27403 Datasheet - Page 107
27403
Manufacturer Part Number
27403
Description
GUIDE APP ROBOTCS W/SUMOBOT V1.0
Manufacturer
Parallax Inc
Datasheet
1.27404.pdf
(266 pages)
Specifications of 27403
Accessory Type
Manual
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
- Current page: 107 of 266
- Download datasheet (6Mb)
should measure the QTI readings for the black surface and use them as a basis for setting
a threshold value to decide whether the QTIs are "seeing" black or white. As you may
have noticed from Activity #2, white QTI measurements are very small in comparison.
Your program can safely set the threshold at 1/4 of the average of the two QTI sensors'
measurements of black. It takes three steps: (1) call the
to update the values of
readings. (3) divide this average by 4. Here is an example:
To discern whether the QTI is looking at black or white, use
The next example program uses these code blocks to tell you whether each QTI is
looking at black or white. Figure 3-13 shows an example of how this program can be
used to test the calibration routine and make sure it's working right.
GOSUB Read_Line_Sensors
qtiThreshold = (qtiLeft + qtiRight) / 2
qtiThreshold = qtiThreshold / 4
You can set higher or lower thresholds. For example, if you divide qtiThreshold by 3
instead of 4, the threshold will be higher. If you divide qtiThreshold by 5 or 6, the
threshold will be lower. A lower threshold value makes the SumoBot less likely to mistake a
crease in the SumoBot Robot Competition Ring for a white tawara line. It also helps
somewhat in brightly lit rooms. In contrast, a higher threshold value may be better for rings
where there is less difference in IR reflectivity between black and white.
You can also save a line of code. These two lines of code:
are equivalent to this one line of code:
IF qtiLeft < qtiThreshold THEN
ELSE
ENDIF
DEBUG "White"
DEBUG "Black"
qtiThreshold = (qtiLeft + qtiRight) / 2
qtiThreshold = qtiThreshold / 4
qtiThreshold = (qtiLeft + qtiRight) / 8
qtiLeft
and
qtiRight
. (2) take the average of the two
Read_Line_Sensors
IF...THEN
statements:
subroutine
Related parts for 27403
Image
Part Number
Description
Manufacturer
Datasheet
Request
R
Part Number:
Description:
Microcontroller Modules & Accessories DISCONTINUED BY PARALLAX
Manufacturer:
Parallax Inc
Part Number:
Description:
BOOK UNDERSTANDING SIGNALS
Manufacturer:
Parallax Inc
Datasheet:
Part Number:
Description:
COMPETITION RING FOR SUMOBOT
Manufacturer:
Parallax Inc
Datasheet:
Part Number:
Description:
TEXT INFRARED REMOTE FOR BOE-BOT
Manufacturer:
Parallax Inc
Datasheet:
Part Number:
Description:
BOARD EXPERIMENT+LCD NX-1000
Manufacturer:
Parallax Inc
Datasheet:
Part Number:
Description:
CONTROLLER 16SERVO MOTOR CONTROL
Manufacturer:
Parallax Inc
Datasheet:
Part Number:
Description:
BASIC STAMP LOGIC ANALYZER
Manufacturer:
Parallax Inc
Datasheet:
Part Number:
Description:
IC MCU 2K FLASH 50MHZ SO-18
Manufacturer:
Parallax Inc
Datasheet: