Orientation Demo using H48C and HM55B

Warning message

The Propeller Object Exchange system is decommissioned and replaced with a GitHub repository to house the same existing and future Propeller objects. As of 12/5/2019, this site is read-only. You can continue to browse and download objects from here for a limited time; however, please begin using the Parallax Propeller repository for future reference.
By: created: 2013-04-12 | updated: 2013-04-12


This demo connects a PropStick USB to the H48C Accelerometer and HM55B Compass. It outputs the
x,y,z from the H48C and the heading from the HM55B to the Parallax Serial Terminal (via FullDuplexSerial).
It also flashes the LEDs to indicate the program is running.
It's very well documented including schematics/pin diagrams, links to relevant documentation and links to needed software. This was written as a comprehensive tutorial for somebody new to the PropStick.
Objects used:
  • H48C : "Sensor.H48C.Accelerometer" 'custom SPIN file located in source folder
  • HM55B : "Sensor.HM55B.Compass" 'custom SPIN file located in source folder
  • Debug : "FullDuplexSerial" 'standard from propeller library
Components needed:
  • Breadboard w/ connector wire set
  • 5-9V power supply (9v battery or 4 AA batteries)
  • PropStick USB
  • H48C Accelerometer
  • HM55B Compass
  • 3 LEDs
  • 1 270 Ohm resistor
  • 1 - LM2940 5 volt regulator
  • 1 - 1000uf capacitor
Software/Downloads needed:
Propeller Tool Software (used to program the Prop):
FTDI USB VCP Drivers (for WinXP):
Parallax Serial Terminal:
Relevant Documentation:
PE-Lab-Setup-for-PropStick USB v1.0.pdf (Simple LED Code and 5 volt power supply)
32210-PropStickUSB-v1.1.pdf (Schematic of PropStick USB)
HitachiH48C3AxisAcelerometer.pdf (Schematic of H48C Accelerometer)
HM55BModDocs.pdf (Schematic of HM55B Compass)
WebPM-v1.01.pdf (Detailed SPIN language documentation 
Basic Build Instructions:
  1. Configure the components based on the PIN diagrams below. Use a breadboard for testing purposes.
  2. Download and install the required software (listed above).
  3. Open the Propeller Tool Software.
  4. From within the Propeller Tool Software, open this file (Orientation Demo using H48C and HM55B.spin).
  5. Connect the PropStick USB to the computer.
  6. Power on the PropStick USB with 5-9v.
  7. From within the Propeller Tool Software, hit F7 to confirm communication with PropStick USB.
  8. From within the Propeller Tool Softwere, hit F10 to compile and load program into the PropStick USB. Make sure this file (Orientation Demo using H48C and HM55B.spin) has the focus when you hit F10, otherwise the file with current focus is loaded onto the PropStick.
  9. Open the Parallax Serial Terminal.
  10. From within the Parallax Serial Terminal, make sure the COM Port is set to the COM port indicated when you hit F7 from the Propeller Tool Softwere and the Baud Rate is 19200 (unless you changed it in this file below).
  11. From within the Parallax Serial Terminal, click 'Enable' (which should be flashing anytime the PropStick USB is connected).
  12. Confirm the screen is output the readings from the sensors.
Diagrams Included
  • Pin Diagram for PropStick USB
  • Pin Diagram for HM55B
  • Pin Diagram for H48C
  • Pin Diagram for 5V Power Supply


Original File Upload
Package icon Orientation_Demo_using_H48C_and_HM55B.zip272.25 KB