I have Raspberry Pi 2 Model B. Have installed Raspbian Wheezy
I need to setup RTC Module in it.
This is what I did.
1. Enabled I2C from raspi-config and set it to load by default
2. Changed /etc/modules and added following lines
Code: Select all
i2c-bcm2708
i2c-devCode: Select all
sudo apt-get install -y python-smbus i2c-tools4. After that I shutdown Pi , and connected the RTC
VCC->5V, GND->GND, SDA->GPI02 and SCL->GPI03
5. At this point when I run
Code: Select all
sudo i2cdetect -y 16. Then I ran following commands:
Code: Select all
sudo modprobe rtc-ds1307
sudo bash
echo ds1307 0x68 > /sys/class/i2c-adapter/i2c-1/new_device
exit
sudo date -s "Sat Sep 12 16:41:00 UTC 2015"
sudo hwclock -w
sudo hwclock –r
7. Then I added rtc-ds1307 to file /etc/modules
And following lines in /etc/rc.local
echo ds1307 0x68 > /sys/class/i2c-adapter/i2c-1/new_device
sudo hwclock -s
date
now when I reboot the Pi, the time is not showing from RTC.
Aslo the command sudo i2cdetect -y 1 shows UU instead of #68
I am not sure what I did wrong. I had followed two tutorials
http://www.raspberrypi-spy.co.uk/2014/1 ... pberry-pi/
http://thepihut.com/blogs/raspberry-pi- ... spberry-pi
Thanking you for any support in advance.
I urgently need this