You are viewing an older revision! See the latest version

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 
00003 #include "TMP102.h"
00004 
00005 TMP102 temperature(p9, p10, 0x90); //A0 pin is connected to ground
00006 
00007 int main()
00008 {
00009   printf("Temperature: %f\n", temperature.read());
00010   return 0;
00011 }

Library

Import libraryTMP102

TMP102 published as a library that can be imported independent


All wikipages