A quick adaptation of a library made for Arduino by Fabio Varesano Interface a Honeywell HMC58X3 magnetometer to a mbed via i2c.

Dependents:   FreeIMU FreeIMU

Fork of HMC58X3 by Aloïs Wolff

Files at this revision

API Documentation at this revision

Wed Apr 18 20:24:06 2018 +0000
Commit message:
change to I2C 1

Changed in this revision

HMC58X3.h Show annotated file Show diff for this revision Revisions of this file
diff -r 5279fb447af1 -r ca00fa66673a HMC58X3.h
--- a/HMC58X3.h	Wed Mar 28 20:25:51 2018 +0000
+++ b/HMC58X3.h	Wed Apr 18 20:24:06 2018 +0000
@@ -38,8 +38,8 @@
 #include "MODI2C.h"
 #ifndef I2C_SDA
-    #define I2C_SDA p28
-    #define I2C_SCL p27
+    #define I2C_SDA p9
+    #define I2C_SCL p10
 #define HMC58X3_ADDR 0x1E // 7 bit address of the HMC58X3 used with the Wire library