TMP102 Temperature Sensor

Table of Contents

  1. Hello World!
  2. Library

The TMP102 is an I2C digital temperature sensor in a small SOT563 package, with a 0.0625C resolution and 0.5C accuracy.

/media/uploads/chris/tmp102_crop.jpg

Hello World!

TMP102mbed
1 - Vcc (square pad)Vout
2 - SDAp9
3 - SCLp10
4 - GndGnd

Import program

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 }

Library

Import libraryTMP102

TMP102 published as a library that can be imported independent


All wikipages