pushpin

Chronodot Library Update

Arduino has just released their 1.0 software update. This is a Big Deal, but it does break some prior content. Changes to the basic libraries and the Wire library have resulted in my simple Chronodot library no longer functioning.

Fortunately it was a quick and simple fix which I’ve attached below.

One of these days I’ll learn how to use Git and do a real repository thing…

Cheers!

Chronodot Library Update

Note – this library is backwards compatible to older Arduino IDEs as well.

4 Comments

  1. jiffyjeff says:

    Hi Stephanie,
    I glanced at your Chronodot library. Thanks for your effort! If you’re so inclined, hosting it on a source control system (github) would help identify the latest version and would help solicit bugfixes and updates. I was looking at the code next to the Maxim DS3231 datasheet and noticed what appears to be a bug: Line 185 of Chronodot.cpp specifies an unsigned int for the integer portion of the temperature, it should probably be a signed int (According to Maxim it’s a two’s complement value). I’m guessing you haven’t tested your Chronodot code below freezing! :)

    Anyway, I would like to borrow your code and fix up bugs if I find them — if you make it easy to contribute I’ll be happy to do so. Again, thank you for the code and have a nice day!

    1. jiffyjeff says:

      … Whoops, got ahead of myself – If it is a two’s complement – the unsigned int is fine, but proper handling of the temp conversion for negative numbers (>127) should be handled. Then again, I haven’t tried the code — I might be missing something. :) Thanks!

    2. Stephanie says:

      Hello Jiffyjeff,

      Thanks for the comments! I hate to admit it but I’ve never used github – I know I need to learn how to use it one of these days…

      Please feel free to use the code and do with it as you wish!

      You are quite correct that I’ve never tried it with my Chronodot below zero – I originally intended to use a Chronodot as the heart of a thermostat for my home HVAC system, as I figured it would save me the bother of using a separate temperature sensor. So I really never thought about it being exposed to anything above the 90′s or below the mid-60′s.

      Thinking about when I first threw it together, I probably used an unsigned int as I was using the ‘byte’ variable type for my temperatures in the thermostat sketch.

      Cheers!

  2. Stephanie says:

    So today I finally dove into that whole github thing, and set up a repository for the library:
    https://github.com/Stephanie-Maks/Arduino-Chronodot

    I have not had a chance to play with that int / unsigned int for handling negative temperatures but I will get to that eventually.

    Cheers!

Leave a Comment