Remote I/O Sensor bus with AT&T flow and M2X cloud

Dependencies:   DHT11 FXOS8700CQ MODSERIAL mbed

Fork of Avnet_ATT_Cellular_IOT by Avnet

Revision:
11:e6602513730f
Parent:
1:af7a42f7d465
Child:
28:886833917643
--- a/hts221_driver.cpp	Mon Jul 11 23:54:24 2016 +0000
+++ b/hts221_driver.cpp	Tue Jul 12 03:11:05 2016 +0000
@@ -8,14 +8,16 @@
 #include <string>
 #include "mbed.h"
 
-I2C i2c(PTC11, PTC10);    //SDA, SCL -- define the I2C pins being used
+#include "hardware.h"
+//I2C i2c(PTC11, PTC10);    //SDA, SCL -- define the I2C pins being used
 
 // Read a single unsigned char from addressToRead and return it as a unsigned char
 unsigned char HTS221::readRegister(unsigned char slaveAddress, unsigned char ToRead)
 {
     char data = ToRead;
 
-    i2c.write(slaveAddress, &data, 1, 0);
+    //i2c.write(slaveAddress, &data, 1, 0);
+    i2c.write(slaveAddress, &data, 1, 1); //by Stefan
     i2c.read(slaveAddress, &data, 1, 0);
     return data;
 }