in reply to EEPROM on i2c Real Time Clock Modules


Your code looks pretty nice, I'll have to try it out and check the E2PROM on some boards I have. I took a quick look at your code and have a couple suggestions (in no particular order):

Keep in mind that these are just some trivial suggestions. If one of my colleagues gave me this code, I'd be perfectly happy with it going into production as it is (assuming that it does what it's supposed to). If you review some of my posts here, you'll notice that I frequently post code that could do with improvement as well.


When your only tool is a hammer, all problems look like your thumb.

Replies are listed 'Best First'.
Re^2: EEPROM on i2c Real Time Clock Modules
by anita2R (Scribe) on Mar 04, 2015 at 17:53 UTC


    Thank you for taking the time to comment on my script, particularly your 'comments on comments'. I certainly take you point about declaring variables close to where they are first used. It would make it easier to understand and remove my double commenting.

    Thanks also for pointing out an alternative to my clunky code for defining when the output reached a boundary point. I should have worked on that a bit more ... the structure I used occurs four times in that script!