Hitachi HM55B Compass Module Problem
Jefe
Posts: 3
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.
Has anyone had any experience with this? Is the LCD / battery/ other sensors messing with the magnetic field enough? Thanks.
Comments
·· Have you used the calibration code for the Compass?
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Tech Support
csavage@parallax.com
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.
·· 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
Any other suggestions?
Attached is a screenshot of the first error.
·· 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