Adding a hardware clock to Raspberry Pi (DS3231)
Submitted by drew on Sat, 09/27/2014 - 06:01
The popular clock module is uses the DS1307 real time clock chip, which is not very precise. For just a few dollars more, you can get a module with a much more precise DS3231 RTC chip. The one I got was SunFounder's module from Amazon for $9 (free shipping for Prime). It plugs right onto the Raspberry Pi's 40 pin header and doesn't even interfere with the plastic case I have. I have a Model B, but this module should also work on Model A and Model B+. The instructions refer to DS1307, but the chips use the same I2C commands, so it also works for DS3231. I changed some references that appear in 'standard' instruction from ds1307 to ds3231, but you could instead leave them as ds1307 just as well.
To install the module, run the following commands (from SunFounder's instructions). Turns out Amazon's product page also has good comments and perhaps more up-to-date than SunFounder's.
1
2
3
4
5
6
7
8
| # Comment out the blacklist entry so the module can be loaded on boot sudo sed -i 's/blacklist i2c-bcm2708/#blacklist i2c-bcm2708/' /etc/modprobe .d /raspi-blacklist .conf # Load the module now sudo modprobe i2c-bcm2708 # Notify Linux of the Dallas RTC device (use -0 for Model A or -1 for Model B) echo ds3231 0x68 | sudo tee /sys/class/i2c-adapter/i2c-1/new_device # Test whether Linux can see our RTC module. sudo hwclock |
You should see a response with what the chip thinks is the date. I think mine said 1999 or some such. No problem.
If your system date is NOT correct (if you don't have an internet connection or something), set the date using ONE of the following commands, with the appropriate date and time, of course:
1
2
3
4
5
| # Only do ONE of two the below: sudo dpkg-reconfigure tzdata sudo date -s "Sep 27 2014 12:46:00" # Now that your system date is correct, simply use this command to transfer the system date to the chip: sudo hwclock -w |
Next, to read the time from the RTC chip and set the system time from it at every boot, open /etc/rc.local and add these two lines above the exit 0 line:
1
2
| echo ds3231 0x68 > /sys/class/i2c-adapter/i2c-1/new_device hwclock -s |
We can also disable the ntp daemon and fake-hwclock during boot.
1
2
| sudo update-rc.d ntp disable sudo update-rc.d fake-hwclock disable |
That's it. Pretty easy.
You can still sync the system time from the internet using...
1
2
| sudo ntpd -gq sudo hwclock -w |
17 comments:
You will never feel uninterested reading the recent articles related to Roku activation code and its remarkable. The unique and creative formats always focus the attention of readers. If you would like to discover the field of writing, suggest visiting our webpage to read the recent articles
I always find time to read your blog post. The recent post related to Roku.com/link activation is interesting to read. Clear guidelines helped me to activate the device quickly.
I'm impressed and would like to know more about your profile. I also need your suggestion to write creative articles. start.watchown.tv/activate
https://sites.google.com/site/rokucomlinkinfocom/blog/howtogetthefoxnationonroku
https://medium.com/@rokucomlinkinfocode/how-to-watch-fox-nation-on-roku-526317b787cf
https://www.musicglue.com/shanerobert/posts/nbc-channel-activation-using-nbccomactivate
FoxNation
FoxNation
Does slacker radio on Roku still exists?
Yes, the slacker radio channel is available on the Roku device. You can get the slacker channel on the Roku's channel hub. You can launch the slacker channel from the music section of the Roku channel hub. This channel is completely free, and you can activate the channel via the www.slacker.com/roku site. You can get the music streaming from the hundreds of stations.
For more information on the slacker radio channel activation, you can contact +1-844-661-1050our professional expert team and get the guidance for the activation.
How to download the Slacker Radio app on Roku?
Download the Slacker Radio app on Roku and all you have to do is to visit the device app store or the channel store. www.slacker.com/roku, this is the page to activate the channel. Selecting the device is the first step. Now add the channel and then proceed with the settings to collect the code. Type the code and wait for a while to complete the activation.
For help and support to complete the activation, talk to our team of customer support executives by Dialing the Toll-free +1-805-436-1200. Pick the top and entertaining shows on the channel to start streaming
To add the Lifetime app to your lineup, access the Roku channel store. After you’ve found the platform, Choose the Add channel tab. The platform gets downloaded to your account successfully. Then you have to activate the Lifetime app by using the mylifetime.com/activate code. Well, this channel’s content is simply sublime and unique. Some of the famous platforms such as Christmas Pen Pals, Jingle Belle, A very Nutty Christmas etc. In case of any queries, you can get the issues fixed by the professional team
How to Watch TCM channel on Roku?
Spend your free time streaming TCM channel shows
Activate TCM channel and stream the entertaining programs on demand. Pick your favorites among Mark of the Vampire, Rising of the Moon, How Green was my Valley and lot more It's easy to activate the channel, add the channel visiting the store, find the activation code and provide the code visiting the page,www.tcm.com.activate.
If you need guidance to complete the channel activation, make a note of the toll-free number +1-855-626-1730 and Dial it right away
If you are interested in streaming E channel on Roku, let me suggest an article to read. Read this post a few days back. It’s interesting. Let me explain the channel activation steps mentioned on the post here
1. Select a compatible Roku device
2. Complete the setup
3. Now visit the device app store
4. Add E channel
5. Login to proceed with the activation
You can also use the TV providers such as DirecTV, Xfinity, Spectrum, AT&T, and Dish to access the channel.
Start reading activate roku to learn how to stream E channel and call @1-888-706-8730 for forther doubts
The Instructions are here to complete HP OfficeJet 3830 scan to the computer. Search to find the compatible scan software to begin the installation. Load the paper to scan over the scanner glass. Open the software and select the scan settings to proceed. Now for help and support to complete HP OfficeJet 3830scan process, please contact our team of customer support executives. If you come across any issues and errors, verify the scan settings, the network connection
How to Resolve my HP Officejet Pro 6968 Printing Black Pages?
Are you stuck in the middle while printing on your HP Officejet 6968? Is your printer printing back pages abnormally? This guide explains how-to instantly fix all of those issues in a jiffy. You can adjust the print preferences under “Printer settings” by enabling the “Print on Both Sides Manually” option. Still no luck in fixing the printer? Do not worry. Our tech-savvies are here to resolve all of your concerns. Contact our Customer Support Team right away to speak with a technical professional to troubleshoot HP Officejet Pro 6968 and fix all your printer problems in the blink of an eye.
Stream Comet TV on Roku
Its time to activate Comet TV on Roku and start watching the top and entertaining programs. It’s the category, Sci & Tech where you can find the channel. After adding the channel, find the activation code and you can provide the code visiting the channel activation page. Start watching the entertaining Comet TV channel programs such as The Outer Limits, Men into Space, Wild World and lot more
To get help and support to complete Comet TV activation, to know how to watch Comet TV on Roku, check out the latest article and Blog post on our portal.
It is our aim to assist you with quality support for the hp envy 4500 airprint/ airprint hp envy 4500 / hp envy 4500 airprint setup, installing the software, and solving printer errors. Recommending you to check out the reviews to search the best model if you have any plan to buy the device. You can talk with our specialized expert squad to know further about the service that we offer.
Thanks for this helpful post. When I was helpless to find the Epson Workforce Epson Workforce WF-7710 Printer Driver for Download for Download, I have a visit to epson.com and finally, I got the solution.
2 bhk Flats for sale in perungudi
Flats for sale in perungudi
Flats for sale in kandanchavadi
2 bhk Flats for sale in kandanchavadi
I like your creative style of writing. You have explained the technical concepts in detail. Your recent post titled, Roku Error Code 018 can help Roku users who do not know how to get rid of the error. Let me share the post on my social media account
I’m impressed after reading your article titled, How to activate Roku using Roku.com/link You have explained Roku.com/link activation steps clearly. My review rating for the blog post would be 100 Starz. Keep posting more interesting blogs
Let me share the post with new users who do not know how to activate Roku
Post a Comment