Save Flash Upload Count to EEPROM

Thread Starter

MrAl

Joined Jun 17, 2014
11,457
Hello Members,

[Arduino Uno, Nano]

Anyone have a good way to save the flash upload count to the EEPROM?
I wanted to keep track of the count of times a 'sketch' has been uploaded to the EEPROM just for reference. This would probably be something the compiler or IDE would have to keep track of somehow.

I have one way now but it requires the user to type in the next number manually such as:
unsigned int FlashCount=10;

then upload, then the next time this has to be changed to:
unsigned int FlashCount=11;

then upload, etc., etc.

It would be nice if this could be entered once somehow, then not worry about it anymore until the chip or board is changed to a different one. Every time the user uploads a sketch, the compiler changes the number in the program or is able to change it some other way without the user having to do anything else.

Thanks :)
 
Top