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.
Dependents: mbed_DEMO mbed_BLE
Diff: ADT7410.cpp
- Revision:
- 1:b13511ed5965
- Parent:
- 0:cebbc4e855af
- Child:
- 2:f01d96ee8fda
--- a/ADT7410.cpp Sat Oct 04 12:01:32 2014 +0000
+++ b/ADT7410.cpp Fri Oct 10 04:39:36 2014 +0000
@@ -36,7 +36,7 @@
}
-int ADT7410::value()
+short ADT7410::value()
{
// RDY?
@@ -44,13 +44,13 @@
// get(ADT7410_STATUS);
// }while(buf[0] & 0x80);
- // get temp_high
+ // get temp_high and low
get(ADT7410_TEMP_H);
temp.byte.HB=buf[0];
- // get temp_low
-// get(ADT7410_TEMP_L);
temp.byte.LB=buf[1];
- return temp.Val;
+ return temp.S;
+
+ // C = temp.S / 128
}