Set Up & Test I2C
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
i2cdetect -y 1
If it complains about the command not being found, then it can be installed with:
sudo apt install i2c-tools
After running i2cdetect -y 1 at the command line, you should see address 0x68 show up - that's the address of the DS1307, PCF8523 or DS3231!
If no address shows up in the I2C scan, check your wiring and try the I2C scan again.
Page last edited April 02, 2026
Text editor powered by tinymce.