Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Revision 2:28a8daf6519b, committed 2020-11-06
- Comitter:
- arthur_2000
- Date:
- Fri Nov 06 17:07:37 2020 +0000
- Parent:
- 1:6a70c9303bbe
- Commit message:
- .
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 Fri Nov 06 17:07:37 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 Fri Nov 06 17:07:37 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: