Step 5: Install I2C packages

Picture of Install I2C packages

Install the i2c-tools and python-smbus packages to complete the I2C setup:

The following commands can be used to install the packages:

sudo apt-get install i2c-tools

sudo apt-get install python-smbus

Finally add the pi user (or whatever login required) to the I2C access group.

The following command can be used to accomplish this:

sudo adduser pi i2c

Use the following command to see what devices are connected to the I2C bus:

i2cdetect -y 1

Note: use the following command if you are using a model A Raspberry Pi

i2cdetect -y0

The I2C address (in hexadecimal) of the temperature sensor should show up if properly connected.