Set Up & Test I2C

Set up I2C on your Pi

You'll also need to set up i2c on your Pi, to do so, run sudo raspi-config and under Advanced select I2C and turn it on.

For more details, check out our tutorial on Raspberry Pi i2c setup and testing at

Reboot once you've done that with sudo reboot

Verify Wiring (I2C scan)

Verify your wiring by running

sudo apt-get install python-smbus i2c-tools

to install the helper software and then sudo i2cdetect -y 1 at the command line, you should see ID #68 show up - that's the address of the DS1307, PCF8523 or DS3231!

If you have a much older Pi 1, you will have to run sudo i2cdetect -y 0 as the I2C bus address changed from 0 to 1

Once you have the Kernel driver running, i2cdetect will skip over 0x68 and display UU instead, this means its working!
Last updated on 2016-10-14 at 09.40.08 PM Published on 2012-08-31 at 01.19.59 PM