Go Down

Topic: HMC5843 compass output to rotating arrow on a graphics display (Read 1 time) previous topic - next topic

0miker0

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.

PaulS


krulkip

Hi,
Maybe you are looking for some processing code like this.
http://www.fact4ward.com/blog/ic-if/hmc5843/

Riva

How about a high resolution (small step) stepper motor with an arrow stuck on the shaft.
Once I almost saw Elvis but then my shovel broke. :(

Go Up
 


Please enter a valid email to subscribe

Confirm your email address

We need to confirm your email address.
To complete the subscription, please click the link in the email we just sent you.

Thank you for subscribing!

Arduino
via Egeo 16
Torino, 10131
Italy