BMC150 magnetometer and accelerometer library.

Dependents:   acd52832_BMC150_example acd52832_bmc150_test

Files at this revision

API Documentation at this revision

Comitter:
Dautor
Date:
Thu Sep 14 08:21:46 2017 +0000
Parent:
8:49d185e97192
Child:
10:1d1123b3df76
Commit message:
Bluetooth debugging.

Changed in this revision

bmc150.cpp Show annotated file Show diff for this revision Revisions of this file
--- a/bmc150.cpp	Mon Sep 11 09:59:37 2017 +0000
+++ b/bmc150.cpp	Thu Sep 14 08:21:46 2017 +0000
@@ -91,6 +91,7 @@
 }
 void BMC150::initMagnetometer(){
     setRegister(0x4B, 0x01);    // Set Power Control bit.
+    wait_ms(10);
     setRegister(0x4C, 0x38);    // Change magnetometer mode in Active mode
     setRegister(0x4E, 0x07);    // Enable magnetometer axes
     setRegister(0x4D, 0xFF);    // Enable interrupts for every axis and override