===Enable OLED display===
Refer to [[How to enable OLED display]]
===Set and Read the RTC time===
PS: We only test this step on Raspberry Pi OS;
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
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
The run the following command to comment out some line in file <code>/lib/udev/hwclock-set</code>:
sudo nano /lib/udev/hwclock-set
<syntaxhighlight lang="python" line highlight="6-11">
#!/bin/sh
# Reset the System Clock to UTC if the hardware clock from which it
# was copied by the kernel was in localtime.
dev=$1
if [ -e /run/systemd/system ] ; then
exit 0
fi
/sbin/hwclock --rtc=$dev --systz
/sbin/hwclock --rtc=$dev --hctosys
</syntaxhighlight>
===Other===