2014-12-08

RTC on Raspberry PI
















 Insert an RTC module from pin #1.

/etc/modules
i2c-bcm2708
i2c-dev
rtc-ds1307

# reboot

# apt-get install i2c-tools
# i2cdetect -y 1
# echo ds1307 0x68 > /sys/class/i2c-adapter/i2c-1/new_device
# hwclock --systohc -D --noadjfile --utc

/etc/rc.local
/bin/echo ds1307 0x68 > /sys/class/i2c-adapter/i2c-1/new_device
/sbin/hwclock -s

0 件のコメント: