PaulKennett / LeafSOCdisplay

A SOC meter for the dash of a Nissan Leaf 2011/2012

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Clear EEprom

betgear opened this issue · comments

Hi Paul, not really a bug, but a suggestion.

You have the clear eeprom commented out in your code which needs to be uncommented first time on running, then commented back out again for the 2nd run. A good technique so save having to upload the code twice is to check an eeprom location for a magic number. If this magic number does not exist, clear the eeprom and then write the magic number. So first time on running the magic number does not exist, so the eeprom is formatted, on the 2nd run the magic number exists and so the eeprom is left untouched.

Oh yes - that's a great solution. I'll do that.

Happy to hear any other ideas you've got!

Thanks, Paul