46 lines
		
	
	
		
			823 B
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
			
		
		
	
	
			46 lines
		
	
	
		
			823 B
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
<!DOCTYPE txt>
 | 
						|
<!Version: 0.1>
 | 
						|
<!Date: 16.11.2017>
 | 
						|
 | 
						|
 | 
						|
raspi-config
 | 
						|
 | 
						|
---------------------------
 | 
						|
Interfacing Options
 | 
						|
 | 
						|
I2C enable
 | 
						|
----------------------------
 | 
						|
 | 
						|
nano /boot/config.txt
 | 
						|
 | 
						|
add at end
 | 
						|
--------------------------
 | 
						|
# Enable HWclock
 | 
						|
dtoverlay=i2c-rtc,ds3231
 | 
						|
-------------------------
 | 
						|
 | 
						|
nano /lib/udev/hwclock-set
 | 
						|
 | 
						|
comment out
 | 
						|
--------------------------
 | 
						|
 | 
						|
if [ -e /run/systemd/system ] ; then
 | 
						|
exit 0
 | 
						|
fi
 | 
						|
-------------------------
 | 
						|
 | 
						|
 | 
						|
Good to know:
 | 
						|
 | 
						|
read time directly from rtc module
 | 
						|
hwclock -r
 | 
						|
 | 
						|
update rtc module time from system time (system time should be regularly updated by ntp from the internet if your pi is networked):
 | 
						|
hwclock -w
 | 
						|
 | 
						|
update system time from the rtc module (this should happen on startup):
 | 
						|
hwclock -s
 | 
						|
 | 
						|
and the most fun of all - monitor the "drift" between your system clock and the rtc module:
 | 
						|
hwclock -c
 |