• If you are citizen of an European Union member nation, you may not use this service unless you are at least 16 years old.

  • You already know Dokkio is an AI-powered assistant to organize & manage your digital files & messages. Very soon, Dokkio will support Outlook as well as One Drive. Check it out today!


Temp Sensor

Page history last edited by sarith.ong@liquidware.com 11 years, 9 months ago


The Temp Sensor for Arduino is the first project of a joint Modern Device-Liquidware collaboration. It’s capable of turning the Arduino into an instant thermometer, plugging directly into Arduino Duemilanove Analog Pins 2-5.

The TMP421 chip is a 12 bit I2C chip that works from minus – 40 to 125 degrees C, so the sensor is able to resolve .04 degrees C per bit. The absolute accuracy is guaranteed to be +/- 1 degree C. The relative resolution should make the sensor useful for a range of higher resolution activities such as sniffing out drafts around windows.

The Temp Sensor comes with a 4-pin male header (unsoldered) and 8 total pin-outs to allow for maximal flexibility in project use. With a small, narrow form factor, it’s easy to set up multiple Temp Sensors for local temperature monitoring as well.

A ready-to-go Arduino library is also available free for download at the Liquidware App Store for full, off-the-shelf integration with any Arduino project.

The chip communicates via I2C and also has an onboard remote temperature sensing capability as well.




  • TMP421 chip
  • 4-pin male header included (unsoldered)
  • Communicates over I2C protocol
  • 1 Bi-directional data pin
  • 1 Clock pin
  • Ranges from – 40C to +125C with +/ – 1C accuracy
  • Optional remote temperature probe input
  • I2C Digital Interface
  • Arduino Pin Compatible
  • +5V Tolerant I/O


Arduino Pin Mapping


Analog 2 = Ground Analog 3 = Vin Analog 4 = Data Analog 5 = Clock








Link to the cheatsheet as a PDF...




Source Code 



#include "Wire.h"

#include <LibTemperature.h>

LibTemperature temp =


void setup() {



void loop() {

Serial.print("Temp: ");



Serial.println(" degC");





Comments (0)

You don't have permission to comment on this page.