Page 1 of 1

DS3231 I2C real time clock.

Posted: Wed Feb 28, 2018 6:05 pm
by gcarver

Re: DS3231 I2C real time clock.

Posted: Thu Mar 01, 2018 8:00 am
by pythoncoder
Looks kinda familiar ;) If you look at my source you'll see that I have a policy of referencing sources when I adapt the code of others. No beef - just saying.

The above repo now includes a cross-platform version of this driver for those wishing to endow their ESP8266 with a decent RTC. The old Pyboard-only version is primarily for rapidly producing the calibration factors for the Pyboard RTC.

Re: DS3231 I2C real time clock.

Posted: Thu Mar 01, 2018 1:37 pm
by deshipu
There is also the uRTC library that supports that chip: https://github.com/adafruit/Adafruit-uRTC

Re: DS3231 I2C real time clock.

Posted: Thu Mar 01, 2018 3:15 pm
by gcarver
pythoncoder wrote:
Thu Mar 01, 2018 8:00 am
Looks kinda familiar ;) If you look at my source you'll see that I have a policy of referencing sources when I adapt the code of others. No beef - just saying.

The above repo now includes a cross-platform version of this driver for those wishing to endow their ESP8266 with a decent RTC. The old Pyboard-only version is primarily for rapidly producing the calibration factors for the Pyboard RTC.
Sorry about that, but it's a coincidence in this case. I adapted code but it was from an Arduino C version. We can remove this post if you'd like.

Re: DS3231 I2C real time clock.

Posted: Thu Mar 01, 2018 4:46 pm
by pythoncoder
gcarver wrote:
Thu Mar 01, 2018 3:15 pm
...Sorry about that, but it's a coincidence in this case. I adapted code but it was from an Arduino C version. We can remove this post if you'd like.
Sorry, but that is patently untrue.

Your code includes my entirely original work on rapidly determining Pyboard calibration values. That couldn't possibly have originated on Arduino. Laughably your code even includes comments I wrote detailing the measurements I took, illustrating that a calibration runtime of five minutes was sufficient. Compare yours with mine.

I don't actually mind. But some regard for the facts and perhaps the courtesy of attribution would help.

Re: DS3231 I2C real time clock.

Posted: Thu Mar 01, 2018 6:00 pm
by gcarver
Wow pythoncoder,
I am truly sorry and I stand completely corrected. I don't make it a habit of writing code that already exists in usable form and don't recall even seeing your code. Please accept my apology. I will re-examine your implementation, and if it works for me I'll go so far as to remove my version and just use yours. If not, I'll add the correct reference to your work. Again, I'm very sorry.

Re: DS3231 I2C real time clock.

Posted: Fri Mar 02, 2018 7:04 am
by pythoncoder
That's fine, Guy, no problem.

There was no need to remove your code. I welcome forks, adaptations and especially PR's with bugfixes or enhancements. That's what open source is all about. My DS3231 driver was based on Dave Smith's WiPy-specific solution: see the credit in the code comments.