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

Comitter:
tyftyftyf
Date:
Wed Apr 18 20:24:06 2018 +0000
Parent:
7:5279fb447af1
Commit message:
change to I2C 1

Changed in this revision

HMC58X3.h Show annotated file Show diff for this revision Revisions of this file
--- 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
 #endif
 
 #define HMC58X3_ADDR 0x1E // 7 bit address of the HMC58X3 used with the Wire library