Library to communicate with LDC1614

Dependencies:   SHTx

Dependents:   Inductive_Sensor_3

Fork of LDC1101 by Bob Giesberts

Revision:
33:2f4c791f37b2
Parent:
32:9712c9bdaf44
Child:
34:b03d7bb9010c
--- a/LDC1614.cpp	Sat Sep 10 12:46:36 2016 +0000
+++ b/LDC1614.cpp	Sun Sep 11 15:08:43 2016 +0000
@@ -274,6 +274,7 @@
     if( ((data[0]>>CHx_ERR_AE) & 1) == 1 ) { debug( "Sensor %d: Amplitude Error\r\n", channel ); }
     
     return ( (data[0] & 0x0fff)<<16 ) | data[1]; // MSB + LSB
+    // return data[1];
 }
 
 uint16_t LDC1614::get_ID( void )
@@ -334,7 +335,7 @@
     {
         _i2c.start();
         _i2c.write( ( 0x2A << 1 ) | 0 ); // 7 bit 0x2A + 0 (write) = 0x55
-        _i2c.write( address );
+        _i2c.write( address + i );
 
         _i2c.start();
         _i2c.write( ( 0x2A << 1 ) | 1 ); // 7 bit 0x2A + 1 (read) = 0x55