HMC5883L

Post Reply
murf64
Posts: 4
Joined: Sat May 18, 2013 2:35 pm

HMC5883L

Post by murf64 » Sat May 18, 2013 7:43 pm

As part of a project I have been working on, I had to port a few libraries from Arduino.
This library allows access to the HMC5883L Magnetometer on the GY-86 ( a 10 DOF IMU Board sold on eBay). Because the HMC5883L is accessed by putting the MPU6050 in bypass mode, it's library (which is also posted here) will also have to be included in your libraries folder. Also the bypass will need to be activated in your MPIDE code, see the example. The HMC5883L will also need to be calibrated to work as a compass, see the notes in the example file.
This library was a bit more difficult to port because of the differences in how the pic32 and arm handles negative values (Two's Complement), see the notes in the .cpp file. I am an amateur with microcontrollers, so please use them at your own risk.
Note: I had reports the old files were corrupt. This is a new upload.
Attachments
HMC5883L.zip
(5.44 KiB) Downloaded 48 times

Post Reply