Pages: [1]   Go Down
Author Topic: HMC5843 compass output to rotating arrow on a graphics display  (Read 1349 times)
0 Members and 1 Guest are viewing this topic.
Nova Scotia
Offline Offline
Full Member
Karma: 4
Posts: 199
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I have purchased a Honeywell three axis HMC5843 compass a little while ago and have the  int ix,iy,iz; float fx,fy,fz; data displayed as text onto a graphics display. My goal would be to have this data displayed as an arrow pointing north.

After searching for code examples out there all I could find is an analog second hand rotating 360 degrees.

second.angle = (2 * pi / 60) * td.second;
second.end_x = second.hand_radius * cos (second.angle) + clock_center_x;
second.end_y = second.hand_radius * sin (second.angle) + clock_center_y;
LCDSetLine(clock_center_x, clock_center_y, second.end_x, second.end_y, WHITE);

If anyone can help it would be appreciated.

Seattle, WA USA
Online Online
Brattain Member
Karma: 610
Posts: 49037
Seattle, WA USA
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

What do ix, iy, iz, fx, fy, and/or fz represent?

Offline Offline
Karma: 0
Posts: 10
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Maybe you are looking for some processing code like this.

* Clipboard22.jpg (160.01 KB, 800x601 - viewed 16 times.)

Norfolk UK
Offline Offline
Faraday Member
Karma: 67
Posts: 2508
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

How about a high resolution (small step) stepper motor with an arrow stuck on the shaft.

There is no such thing as a stupid question but there are a lot of inquisitive idiots.

Pages: [1]   Go Up
Jump to: