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.cpp
- Revision:
- 16:7ac462ba84ac
- Parent:
- 15:69991c038abe
--- a/LM75B.cpp Fri May 02 17:28:17 2014 +0000 +++ b/LM75B.cpp Fri May 30 19:04:36 2014 +0000 @@ -191,11 +191,13 @@ return value * 0.125; } +#ifdef MBED_OPERATORS LM75B::operator float() { //Return the current temperature reading return temp(); } +#endif char LM75B::read8(char reg) {