This uses the published version of the library that can be imported independently

Dependencies:   mbed TMP102

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers main.cpp Source File

main.cpp

00001 #include "mbed.h"
00002 #include "TMP102.h"
00003 
00004 TMP102 temperature(p9, p10, 0x90); //A0 pin is connected to ground
00005 
00006 int main()
00007 {
00008   while(1) {
00009     printf("Temperature: %f\n", temperature.read());
00010     wait(1.0);
00011   }
00012 }