Author Topic: Adding a DS3231 Real Time Clock to the Pi  (Read 5099 times)

0 Members and 1 Guest are viewing this topic.


  • Administrator
  • Sr. Member
  • *****
  • Posts: 268
    • View Profile
    • Zipzap Computers Limited
Adding a DS3231 Real Time Clock to the Pi
« on: September 11, 2017, 09:18:19 am »
The Pi does not have a RTC as standard but they cost less than 5 pounds. Fitting and setup is easy but it would have been even easier if it came with instructions!

Add the i2c interface in RASPI-CONFIG

Add the following line in /boot/config.txt using Nano -


So sudo nano /boot/config.txt

CTRL O then CTRL X to finish.

Then -

sudo nano /lib/udev/hwclock-set

Alter -

if [-e /run/systemd/system];
exit 0


#if [-e /run/systemd/system];
#exit 0

Power down. Fit the RTC. A diagram of where to fit it would have been nice.


Test with -

sudo hwclock -r

PS Another one to remind me!
« Last Edit: February 08, 2023, 08:39:22 pm by norman »