OpenSprinkler › Forums › Hardware Questions › OpenSprinkler Pi (OSPi) › DS1307 W RPI Wheezy Softfloat › Re: Re: DS1307 W RPI Wheezy Softfloat
Ray
A while back Dan in CA sent me some instructions on how to use RTC with RPi. I tried and they seem to work. I’m posting his instructions here, hope these help:
FYI
after a few different iterations, here are the settings I used to access the RTC:
1. added following lines to /etc/modules (sudo nano /etc/modules)
i2c-bcm2708
rtc-ds1307
2. added following line to /etc/rc.local
echo ds1307 0x68 > /sys/class/i2c-adapter/i2c-0/new_device
3. Reboot
must be root or use sudo: hwclock -r to read clock.
set the hardware clock from the current system time: hwclock -w
set the system time from the hardware clock: hwclock -s
Following up on the RTC stuff:
You must ‘sudo -s’ before you can set the RTC.