

- Arduino i2c example temperature serial#
- Arduino i2c example temperature full#
- Arduino i2c example temperature code#
Arduino i2c example temperature serial#
Serial.begin(9600) // start serial for output Wire.begin() // join i2c bus (address optional for master) Set the TMP Address and Resolution here
Arduino i2c example temperature code#
This code has 2 configurable settings at the top, the TMP100 address (as defined in the table above) and the temperature resolution. In this example I’ve connected the chip to an Arduino and grounded ADD0 to set the address to “1001011” See the table below for the exact trade off. This accuracy comes at a price which is the speed it can calculate the temperature. This feature is set by writing the desired value to the configuration bit.

By default it reads the temperate in 0.5 degrees Celsius increments but can be as accurate at 0.0625 degrees Celsius. The accuracy or resolution with which the TMP100 reads the current temperature is able to be configured by the user. This means you can include up to 8 of these chips into a project. The I2C address of the TMP100/101 is determined by the ADD0 and ADD1 pins.

I ended up soldering it with a 3rd hand, magnifying glass, tweezers and patience. Sparkfun offers both the breakout board and some great tutorials on soldering SMDs. This brings up the issue of soldering SMD components. This is a surface mount device (SMD), because of its size you’ll need a breakout board to work with it on a breadboard. The TMP100 comes in the very tiny SOT23 package. The TMP100 has 2 features that made me choose it over the other versions:ġ) It supports input voltages of 2.7v to 5.5 as opposed to the 102 which needs to be between 1.4v and 3.6vĢ) It has 2 address pins which allows for up to 8 of these sensors on a single I2C bus One Tiny Chip Whether you are creating a thermostat, monitoring computer temperatures or building a beer brewing system, you need to know the temperature (and sometimes it helps to know the temperature from several different spots). Sensing temperature is a useful function to incorporate in your projects. This is one in a family of digital I2C temperature sensors from Texas Instruments they all function in a similar way but have slightly different features.
Arduino i2c example temperature full#
There are many components and full devices that can connect through I2C, today we’ll be looking at the TMP100. If you’re unsure about your device’s address, and especially if you’re only going to use one I☬ device in your project, use a program called Arduino I2C Scanner to see each connected device’s address.As you can see from my previous articles, I’m a big fan of I2C. I☬ modules include a default value for their address, but to set them up you’ll need to use jumpers or connect certain solder pads. Take note: you only need one resistor for each line, even if you’ve chained together multiple modules. Some boards even include built-in accommodations for these resistors. We use a 4.7kohm value for this setup, which is standard, but not essential. You’ll also need to attach SDA and SCL to a positive voltage through a pull-up resistor.
