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 Interface Options, select I2C and turn it on.
For more details, check out our tutorial on Raspberry Pi i2C setup and testing at http://learn.adafruit.com/adafruits-raspberry-pi-lesson-4-gpio-setup/configuring-i2c
You may need to reboot once you've done that with sudo reboot
sudo apt-get install python3-smbus i2c-tools
This installs 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.
Page last edited April 07, 2026
Text editor powered by tinymce.