modify the write function for temperature update If you use update temperature, you modify the repeat condition when write function use - read16() -> m_I2C.write(m_Addr, ®, 1); //stop condition - read16() -> m_I2C.write(m_Addr, ®, 1,1); //repeat condition
Fork of LM75B by
Diff: LM75B.h
- Revision:
- 17:c62f1e2d721e
- Parent:
- 12:fc27dc535ea9
--- a/LM75B.h Mon Sep 16 21:32:18 2013 +0000 +++ b/LM75B.h Mon Jul 20 09:36:26 2015 +0000 @@ -101,7 +101,8 @@ * @param scl The I2C clock pin. * @param addr The I2C slave address (defaults to ADDRESS_0). */ - LM75B(PinName sda, PinName scl, Address addr = ADDRESS_0); + //LM75B(PinName sda, PinName scl, Address addr = ADDRESS_0); + LM75B::LM75B(PinName sda, PinName scl, Address addr, int hz); /** Probe for the LM75B and reset it to default configuration if present *