News for hackers. Stuff that matters.
Re:Arduino Death Clock by magnat on Tuesday November 14, 2017 @05:09AM (#15693895)
ATmega's EEPROM has a lifetime of 100k write/erase cycles. The program stores current time every 10 minutes, giving it ~2 years of lifetime. It looks like the clock will die long before you.
Re:Arduino Death Clock by struppi on Tuesday November 14, 2017 @06:36AM (#15694215)
Totally off-topic, except for the EEPROM:

A colleague once told me about a bug in it's audi where it would write the current volume of the radio to an EEPROM after every volume change. So, after a few years, the car stopped remembering the last volume setting when turning the radio off and on, because the EEPROM died.

Re:Arduino Death Clock by garaetjjte on Tuesday November 14, 2017 @08:38AM (#15694824)
It's much worse: on every knob turn, modified value is written to EEPROM, and then real volume is set to value immediately read from EEPROM. So after some time volume control stopped working at all! (Audi Concert, Chorus)
Re:Arduino Death Clock by kirillkh on Tuesday November 14, 2017 @05:20AM (#15693925)
Perhaps it's better to set it to 2 years, then. A clock that's counting time towards its own death. There is some grim poetry in that.
Re:Arduino Death Clock by delinka on Tuesday November 14, 2017 @07:34AM (#15694481)
Why does the thing store the current time every 10 minutes? Seems like it needs your DOB, and whatever the current clock time is - and even a few minutes of drift isn't going to be a problem for an application like this. If it's ever connected to the tubes, it can adjust its clock from a time server.
Re:Arduino Death Clock by magnat on Tuesday November 14, 2017 @08:21AM (#15694717)
Arduino (ATmega328) without additional boards does not have RTC nor any network connectivity. Using other microcontroller, such as ESP8266, one could fetch time from NTP, parse life expectancy tables from WWW, use GeoIP for checking which country you live in.
Re:Arduino Death Clock by upofadown on Tuesday November 14, 2017 @09:11AM (#15695071)
Yeah, if you are doing something like this you have to figure out some way to spread out the writes over the available EEPROM. Since we are just storing a time it would be pretty easy to do, just always write to the next location and pick the largest value on restore.
Re:Arduino Death Clock by adamtait on Tuesday November 14, 2017 @04:27PM (#15699298)
Thanks! I've updated the code to only save twice a day giving the EEPROM an estimated lifetime of 137 years. It's a little more inconvenient, but (maybe) less inconvenient than having to buy a new EEPROM (or likely a new Arduino) every couple years.
Re:Arduino Death Clock by photojosh on Tuesday November 14, 2017 @09:35PM (#15701060)
Or you could add a circular buffer to distribute the writes over the whole EEPROM as per Atmel app note AVR101: High Endurance EEPROM Storage [0]? :)

Just kidding...

[0]: http://www.atmel.com/images/doc2526.pdf