Shop OBEX P1 Docs P2 Docs Learn Events
Hitachi HM55B Compass Module Problem — Parallax Forums

Hitachi HM55B Compass Module Problem

JefeJefe Posts: 3
edited 2005-08-22 03:25 in BASIC Stamp
So I'm working on this project to have an LCD display on my car dashboard that give me compass directions in addition to g forces in two dimensions. I've got most of the code concerning the LCD and the Memsic Accelerometer worked out, and I'm having some trouble with the compass. It doesn't seem to read North when it should- the degrees readings rarely drop below 90 or so... so while I'm spinning around with my LCD like an idiot, the readings jump around way too much, although in general are somewhat correct.

Has anyone had any experience with this? Is the LCD / battery/ other sensors messing with the magnetic field enough? Thanks.

Comments

  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2005-08-21 00:22
    Hello,

    ·· Have you used the calibration code for the Compass?

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Tech Support
    csavage@parallax.com
  • JefeJefe Posts: 3
    edited 2005-08-21 02:04
    I have tried the calibration program, to no avail....
    I'm using a HomeWork Board, if that makes a difference.

    When I run the calibration program, the first error occurs on this line:
    ELSEIF character = "r" OR character = "R" THEN
    The error is
    Label is missing ":"
    I rewrote this line to just ELSE, which I figured would work fine.
    The next error occurs:
    DEBUG CRSRX, 1, DEC3 brads
    The error is
    Undefined Symbol
    I'm no where near proficient in PBASIC, so I tried looking up CRSRX. Seems to position the cursor in the debug window... I haven't had success reprogramming this part.

    If anyone has a fixed version of the calibration program, I'd be eternally grateful. And you get my firstborn.
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2005-08-21 02:22
    Hello,

    ·· Please try clicking on the PBASIC 2.5 directive on the toolbar, or select from the Directive Menu, PBASIC and version 2.5.· That should stop you from getting those errors.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Tech Support
    csavage@parallax.com
  • JefeJefe Posts: 3
    edited 2005-08-21 22:43
    The PBASIC directive is definitely 2.5 and still no luck.
    Any other suggestions?

    Attached is a screenshot of the first error.
    1024 x 768 - 38K
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2005-08-22 03:25
    Okay,

    ·· Two things...One, what version of the editor are you using?· I don't see a PBASIC 1.0 icon in your toolbar, nor do I see a BS2px24, so I am guessing it is an older version.· If so, you could try and download the current version, 2.1 from our website at www.parallax.com under Downloads/BASIC Stamp Software.· Theother thing is you could attach the exact code you are using and I could see if it's something else.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Tech Support
    csavage@parallax.com
Sign In or Register to comment.