Arduino
Using the TMP119 temperature sensor with Arduino involves wiring up the sensor to your Arduino-compatible microcontroller, installing the Adafruit_TMP117 library and running the provided example code.
The TMP119 has better accuracy and a different chip identifier from the TMP117, but is otherwise 100% compatible with the TMP117 firmware interface.
Wiring
Wire as shown for a 5V board like an Uno. If you are using a 3V board, like an Adafruit Feather, wire the board's 3V pin to the TMP119 VIN.
Here is an Adafruit Metro wired up to the TMP119 using the STEMMA QT connector:
-
Board 5V to breakout STEMMA VIN (red wire)
-
Board GND to breakout STEMMA GND (black wire)
-
Board SCL to breakout STEMMA SCL (yellow wire)
- Board SDA to breakout STEMMA SDA (blue wire)
Here is an Adafruit Metro wired up using a solderless breadboard:
-
Board 5V to breakout VIN (red wire)
-
Board GND to breakout GND (black wire)
-
Board SCL to breakout SCL (yellow wire)
- Board SDA to breakout SDA (blue wire)
Library Installation
You can install the Adafruit TMP117 library for Arduino using the Library Manager in the Arduino IDE.
Click the Manage Libraries ... menu item, search for Adafruit TMP117, and select the Adafruit TMP117 library:
If asked about dependencies, click "Install all".
If the "Dependencies" window does not come up, then you already have the dependencies installed.
/**
* @file TMP119_basic_test.ino
* @brief Basic test sketch for the TMP117/TMP119 temperature sensor
* @date 2025-02-25
*
* @copyright Copyright (c) 2025
*
*/
#include <Adafruit_Sensor.h>
#include <Adafruit_TMP117.h>
#include <Adafruit_TMP119.h>
// Adafruit_TMP117 tmp11x;
Adafruit_TMP119 tmp11x;
// To use with TMP117 instead, uncomment the TMP117 include/line above
// and comment out the TMP119 include/line
void setup(void) {
Serial.begin(115200);
while (!Serial)
delay(10); // will pause Zero, Leonardo, etc until serial console opens
Serial.println(F("Adafruit TMP117/TMP119 test!"));
// Try to initialize!
if (!tmp11x.begin()) {
Serial.println(F("Failed to find TMP117/TMP119 chip"));
while (1) {
delay(10);
}
}
Serial.println(F("TMP117/TMP119 Found!"));
}
void loop() {
// Wait for fresh data before reading
while (!tmp11x.dataReady()) {
delay(10);
}
sensors_event_t temp; // create an empty event to be filled
tmp11x.getEvent(
&temp); // fill the empty event object with the current measurements
Serial.print(F("Temperature "));
Serial.print(temp.temperature);
Serial.println(F(" degrees C"));
Serial.println();
delay(1000);
}
Upload the sketch to your board and open up the Serial Monitor (Tools -> Serial Monitor) at 115200 baud. You should see that the sketch has found your connected TMP119 sensor. Then, you'll see the temperature readings in Celsius printed to the Serial Monitor every second.
Page last edited March 13, 2026
Text editor powered by tinymce.