The TMP102 is a low power digital temperature sensor with I2C interface. This is a library (for arduino or cpp) that gives a simple interface with the TMP102 module. You can easily read the temperature with the arduino just by requesting a single line. This keeps your sketches easy. Downloads and example usage is below.
Download
Example
This code is also included in the .zip and you can request it generally with the example from the menu in the arduino IDE.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | #include <Wire.h> #include <TMP102.h> void setup() { Serial.begin(9600); TMP102.init(); } void loop() { int t; delay(100); // There will be new values every 100ms TMP102.getValues(&t); Serial.print("Temperature: "); Serial.println(t); } |

The [Temperature] TMP102 Sensor Library by Tim Zaman, unless otherwise expressly stated, is licensed under a Creative Commons Attribution 3.0 Unported License.
![[Temperature] TMP102 Sensor Library The TMP102 is a low power digital temperature sensor with I2C interface. This is a library (for arduino or cpp) that gives a simple interface with the TMP102 module. You...](http://www.timzaman.nl/wp-content/uploads/2011/04/header_tmp102-620x250.jpg)






The example sketch fails to compile under Arduino 1.0 RC2.
Hi, how can i work with 2 or more sensors???
regards
thanks for the code and the example, may i ask for the shutdown mode and one shoot? So i can take the atmega to sleep.
Manyg thanks in advance.