Configuring the Pi for I2C

Author Gravatar Image KEVIN TOWNSEND
Before you can get started with I2C on the Pi, you'll need to run through a couple quick steps from the console.
Check out this tutorial for more details and follow it completely

When you're done, run
Copy Code
sudo i2cdetect -y 0 (if you are using a version 1 Raspberry Pi)
sudo i2cdetect -y 1 (if you are using a version 2 Raspberry Pi)        
This will search /dev/i2c-0 or /dev/i2c-1 for all address, and if an Adafruit BMP085 Breakout is properly connected it should show up at 0x77 as follows:
Once both of these packages have been installed, you have everything you need to get started accessing I2C and SMBus devices in Python.
Last updated on 2014-04-18 at 07.06.26 AM Published on 2012-08-14 at 05.07.18 PM