Library for the MAX44000 Ambient Light Sensor / Proximity Detector

Dependents:   LED_Demo LED_Demo2 LED_Demo

Fork of BMP180 by Kevin Gillepsie

MAX44000 Device Driver

Files at this revision

API Documentation at this revision

Comitter:
switches
Date:
Tue Sep 20 22:02:02 2016 +0000
Parent:
2:91f97c274e89
Child:
4:a9f09252653a
Commit message:
Found bug that prevented using factory trim data in init command.

Changed in this revision

MAX44000.cpp Show annotated file Show diff for this revision Revisions of this file
--- a/MAX44000.cpp	Wed May 04 18:03:38 2016 +0000
+++ b/MAX44000.cpp	Tue Sep 20 22:02:02 2016 +0000
@@ -78,7 +78,7 @@
     }
 
     data[0] = REG_MAIN_CONFIG;
-    data[1] = ((mode & 0x07)<<2);
+    data[1] = ((mode & 0x07)<<2) | 0x20;  // Set bit 5 to use factory trim data
     if (i2c_->write(I2C_ADDR, data, 2) != 0) {
         return -1;
     }