Tuesday, December 30, 2014

cloudClock: DS3231 RTC

Bought one of this from Dealextreme a while ago for this project, but only now I had the time to look into trying it. The exact one I bought is the one in the picture above, link here.

In order to use it, I searched for available libraries and turns out someone had already done all the work. The library can be found here and requires installing also the Time library, available here.  To connect it to the arduino is plain easy, vcc, ground, SDA and SCL and that's all. Sounded easy... plugged it, compiled the example and... FAIL... hmmm... it did not work... nothing... After reviewing the code and the soldering, could not see anything wrong, so I went to the basics... Arduino Yun pinout. If you see the Arduino Yun pinout you may notice how SDA and SCL are in 2 places and if you see my wiring diagram for the arduino yun internet radio, you will noticed that my rotary encoder is plugged in the pins carrying the SDA and SCL signals... oops... unplug the rotary encoder and there I had it... RTC working. So this is how it looks like now (corresponding change will have to be done to the yun radio code to adapt to the rotary encoder pin change, also the RTC module does not correspond to the one I am using, but pins are named identically):

No comments:

Post a Comment