28029 Parallax Inc, 28029 Datasheet - Page 151

KIT PARTS SMART SENSORS W/TEXT

28029

Manufacturer Part Number
28029
Description
KIT PARTS SMART SENSORS W/TEXT
Manufacturer
Parallax Inc
Datasheet

Specifications of 28029

Accessory Type
Parts Kit
Product
Microcontroller Accessories
Lead Free Status / RoHS Status
Contains lead / RoHS non-compliant
For Use With/related Products
BASIC Stamp® or Javelin Modules
Lead Free Status / RoHS Status
Lead free / RoHS Compliant, Contains lead / RoHS non-compliant
Other names
28029PAR
Heading
TestCalibratedCompass.bs2 goes and finds the values that CalibrateCompass.bs2
recorded in the BASIC Stamp's EEPROM memory. Then, it uses the values to correct
for scale error, and refines the measurements using a technique called linear interpolation.
If this still isn't enough accuracy for you, the next activity will show you how to improve
it even more.
Example Program: TestCalibratedCompass.bs2
' -----[ Title ]--------------------------------------------------------------
' Smart Sensors and Applications - TestCalibratedCompass.bs2
' Demonstrates Hitachi HM55B Compass Module's accuracy after calibration with
' CalibrateCompass.bs2.
'
'
'
' -----[ Program Description ]------------------------------------------------
'
' This program displays the following Hitachi HM55B Compass Sensor
' measurements:
'
'
'
'
'
'
' IMPORTANT: This program relies on EEPROM values that are stored by
'
- Offset corrected x and y-axis magnetic field measurements
- Binary radian angle clockwise from north corrected by linear
- Degree angle clockwise from north corrected by linear interpolation
{$STAMP BS2}
{$PBASIC 2.5}
interpolation table
table
Print or photocopy the scale shown in Figure 4-11 and following the Setup in
Activity #2 for aligning it to north and affixing it to the table.
Calculate the unmarked angles on the scale.
Open and run TestCalibratedCompass.bs2.
Align your board to the various angles, and compare the measured angles
reported by the compass module to the actual angles.
Free Download This program is available as a free .bs2 file download from the Smart
Sensors and Applications Product Page at www.parallax.com. Read the code comments for
an explanation of its function.
CalibrateCompass.bs2 during the calibration process.
Chapter 4: Hitachi HM55B Compass Module · Page 139

Related parts for 28029