Added PiRTC setup scripts
This commit is contained in:
13
PiRTC/install.sh
Executable file
13
PiRTC/install.sh
Executable file
@ -0,0 +1,13 @@
|
||||
#!/bin/sh
|
||||
|
||||
# software
|
||||
sudo apt-get install python-smbus i2c-tool
|
||||
|
||||
# check
|
||||
sudo i2cdetect -y 1
|
||||
|
||||
# config
|
||||
cp /boot/config.txt /boot/config.bak
|
||||
echo "" >> /boot/config.txt
|
||||
echo "dtoverlay=i2c-rtc,ds3231" >> /boot/config.txt
|
||||
|
||||
17
PiRTC/setup.sh
Executable file
17
PiRTC/setup.sh
Executable file
@ -0,0 +1,17 @@
|
||||
#!/bin/sh
|
||||
|
||||
# check
|
||||
sudo i2cdetect -y 1
|
||||
|
||||
# remove fake
|
||||
sudo apt-get -y remove fake-hwclock
|
||||
sudo update-rc.d -f fake-hwclock remove
|
||||
sudo systemctl disable fake-hwclock
|
||||
|
||||
# device
|
||||
cp hwclock-set /lib/udev/hwclock-set
|
||||
|
||||
# set
|
||||
sudo hwclock -r
|
||||
sudo hwclock -w
|
||||
sudo hwclock -r
|
||||
Reference in New Issue
Block a user