Client voor Round-robin
Revision 2:a5813fdaf0e8, committed 2020-10-29
- Comitter:
- thomasluca
- Date:
- Thu Oct 29 17:56:13 2020 +0000
- Parent:
- 1:6a70c9303bbe
- Commit message:
- Client voor Round-robin
Changed in this revision
LM75B.cpp | Show annotated file Show diff for this revision Revisions of this file |
LM75B.h | Show annotated file Show diff for this revision Revisions of this file |
--- a/LM75B.cpp Fri Oct 26 21:40:51 2012 +0000 +++ b/LM75B.cpp Thu Oct 29 17:56:13 2020 +0000 @@ -15,12 +15,12 @@ } -float LM75B::read() +uint16_t LM75B::read() { char cmd[2]; cmd[0] = LM75B_Temp; i2c.write( LM75B_ADDR, cmd, 1); // Send command string i2c.read( LM75B_ADDR, cmd, 2); // Send command string - return ( float((cmd[0]<<8)|cmd[1]) / 256.0 ); + return ((cmd[0]<<8)|cmd[1]); }
--- a/LM75B.h Fri Oct 26 21:40:51 2012 +0000 +++ b/LM75B.h Thu Oct 29 17:56:13 2020 +0000 @@ -53,7 +53,7 @@ /*! Reads the temperature register of the LM75B and converts it to a useable value. */ - float read(); + uint16_t read(); private: