Free graphical viewer for the Hitachi HM55B Compass Module
Ken Gracey
Posts: 7,400
Hello,
Doug and Andy have really put the new Hitachi HM55B Compass Module to good use in our office. Andy is preparing some educational documentation,·and Doug just·designed a neat·viewer utility for the·sensor using Delphi. It works like this:
We hope you enjoy this neat software. This compass is providing six bits of calibrated resolution.
Ken Gracey
Parallax, Inc.
Doug and Andy have really put the new Hitachi HM55B Compass Module to good use in our office. Andy is preparing some educational documentation,·and Doug just·designed a neat·viewer utility for the·sensor using Delphi. It works like this:
- Program the BASIC Stamp with the HM55B Demo Software.bs2. Or, if you prefer, run the version to calibrate the module as described in the product documentation.
- Close the DEBUG window to free the serial port.
- Run HM55B Demo.exe, configure the serial port and click "Run".
We hope you enjoy this neat software. This compass is providing six bits of calibrated resolution.
Ken Gracey
Parallax, Inc.
exe
826K
Comments
The graphic tool below is awesome.· I would like to write my own version of the tool in C# and was hoping that someone could point me to the source code (if its available anywhere)...so I can model my new tool similar to this one.· Was this tool written in Delphi ? Just curious...
Also, i'm not sure if this is the right forum to submit a question concerning the Compass chip, but figure I would try in the hopes that someone might be able to help me (or point me in the right direction).
When I use the demo source for the Basic Stamp 2 chip, the compass readings fluxuation and never stay still. I can place my breadboard flat on a table (and not touch it) but yet the compass readings are rather jumpy.
How can I stabilize this ? I'd love to be able to leave it flat and have the readings only jump 1 or 2 degrees in either direction. Right now,· it jumps +/-10 degrees.· Is there any supporting circuitry I can add to minimize this ?
Thanks in advance for any tips.
Regards,
·Stonebridge
That's a nice piece of software, thank you.
Is there·ANY way (notice I didn't say easy) to keep the debug window open while using the·viewer utility?·I have the USB BS2.
I'm using the debug window to control a few things as well as for other sensor output·values.·I could just use the normal HM55B degree outputs in the debug window but I'd love to be able to use the debug window·AND your viewing utility.
·
If you could connect a second serial port to the BASIC Stamp, and you replace add SEROUT n9600 commands after each DEBUG command to send the same data to a serial port as you did to the blue DEBUG window, then yes. The USB2SER would be an easy way to achieve this without wiring up a second serial port on the BOE. Another way would be to use our RS-232 AppMod, but your PC will need a second serial port (or you need a USB to serial adapter). I think that some of our boards (like the Professional Development Board) have an extra serial port for this purpose, which could be yet a third solution.
Hope this helps.
Ken Gracey
Parallax, Inc.
I'll use one of your suggestions, it will be worth it, accurate and easy to read heading data is pretty important to my project.
I notice you and chris are posting this afternoon. the boss has everyone working on a Sunday during football season.....bummer. [noparse]:)[/noparse]
If Chris and I find free time we're likely to do the same thing with it: pursue our hobbies! And they're all closely related to what we do at Parallax.·I·don't watch football and I don't think Chris does either.
Or you could say that Chris and I have the same disorder. . .
Ken Gracey
Parallax, Inc.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Tech Support
I'm sure others will point out more useful C/C++ resources for serial port interfacing.
Ken Gracey
http://forums.parallax.com/showthread.php?p=671804
If VB express is what you are using·and you would like some help PM your email and Ill help set it up.
You would need to design your own graphics. The screen shot has a Trackbar that rotates the needle through 360 deg to verify the markings on the graphics, this would be removed once you are satisfied with the layout.
Jeff T.
Is there any way to connect the Hitachi HM55B with the uOLED-96-Pro or uOLED-128-G1;
and have it display the compass direction as the programs above?
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Fernando Gomez
Never compare yourself with anyone else, there will always be someone bigger·or·smaller·than you.
Step 1 would be to create an image in a paint program of the unit facing 0 degrees (North). Create 359 more images moving the needle 1 degree each time.
Step 2 would be to download these images to the on-board micro-SD card using the Graphics Composer software.
Step 3 would be to write your own code (maybe based off the demo code) to send the uOLED-128-G1 a command to display the picture corresponding to the current heading in degrees.
Now, myself, I would probably focus on 8 or 16 headings and write the code to call up those images. This is a better option from say, a BASIC Stamp module. Trying to redraw the arrow in real-time from a BASIC Stamp Module would be too slow. If you were using a Propeller chip you could do that, though I might still be inclined to simply use pre-designed images. Of course, the real-time updated image would be more fluid.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Engineering