Quick Start
© Parallax, Inc. • Hitachi HM55B Compass Module (#29123) • 05/2005
Page 2 of 25
Downloading the Example Programs
The example programs featured in the Source Code section (pages 12 - 24) are also available for
download from the Hitachi HM55B Compass Module product page at www.parallax.com.
√
Go to www.parallax.com/detail.asp?product_id=29123.
√
Click the "Hitachi HM55B Compass Module Source Code (.zip)" link and download the file.
√
Unzip to a convenient folder.
Connecting and Testing the Compass Module
This section contains connection and test instructions for the Parallax BASIC Stamp 2® series and Ubicom
SX microcontrollers.
BASIC Stamp 2 Series
Use the instructions in this section to test your Hitachi HM55B Compass Module if you have a BASIC
Stamp 2, 2sx, 2e, 2p, 2pe, or 2px. The goal of this first test is to verify that the module is connected,
functional, and communicating properly with the BASIC Stamp. Since this first test is run before
calibration, there may sizeable differences between magnetic compass directions and what the module
reports.
√
Build the circuit shown on page 1.
√
Place your board on a level surface away from magnetic field disturbances. Common culprits
include magnetic compasses, motors, bar/horseshoe/ring magnets, and large metal objects.
Also, make sure your programming cable and power cords do not wrap around or pass near the
sensor.
√
Open TestHm55bCompass.bs2 with the BASIC Stamp Editor (v2.0 or later). Update the $STAMP
directive if needed, then run the program.
√
Test your Compass Module for direction detection as shown below, comparing your degree
measurements to the compass legend in the figure.