You are viewing an older revision! See the latest version
TMP102 Temperature Sensor
The TMP102 is an I2C digital temperature sensor in a small SOT563 package, with a 0.0625C resolution and 0.5C accuracy.
It's available at Sparfun on a breakout board.
Hello World!¶
| TMP102 | mbed |
| 1 - Vcc (square pad) | Vout |
| 2 - SCL | p9 |
| 3 - SDA | p10 |
| 4 - Gnd | Gnd |
http://mbed.org/users/donatien/programs/TMP102HelloWorld
#include "mbed.h"
#include "TMP102.h"
TMP102 temperature(p9, p10, 0x90); //A0 pin is connected to ground
int main()
{
printf("Temperature: %f\n", temperature.read());
return 0;
}
Library¶
http://mbed.org/users/donatien/programs/TMP102
The library is documented in Doxygen.