Changes

Jump to navigation Jump to search

X729-script

473 bytes added, 19:34, 22 July 2023
PS: We only test this step on Raspberry Pi OS;
1. To enable RTC module, first add <code>dtoverlay=i2c-rtc,ds1307</code> to /boot/config.txt under [all] or the end of file and reboot:
sudo nano /boot/config.txt
2. Run the commands to disable the "fake hwclock" which interferes with the 'real' hwclock
sudo apt-get -y remove fake-hwclock
sudo update-rc.d -f fake-hwclock remove
sudo systemctl disable fake-hwclock
3. Then run the following command to comment out 7-12 line in file <code>/lib/udev/hwclock-set</code>:
sudo nano /lib/udev/hwclock-set
‎<syntaxhighlight lang="python" line highlight="7-12">
PS: Inserting a `# `at the beginning of a line means to comment the line
4. Reboot the Raspberry Pi sudo reboot5. Run the command to verify the time is correct. Plug in Ethernet or WiFi to let the Pi sync the right time from the Internet date6. Run the command to write the time sudo hwclock -w7. Run the command to read the time sudo hwclock -rOnce the time is set, make sure the batteries are inserted so that the time is saved. You only have to set the time once. That's it! Next time you boot the time will automatically be synced from the shield.
===Other===

Navigation menu