Save Flash Upload Count to EEPROM

Discussion in 'Embedded Systems and Microcontrollers' started by MrAl, Oct 15, 2015.

  1. MrAl

    Thread Starter Distinguished Member

    Jun 17, 2014
    3,139
    632
    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 :)
     
  2. OBW0549

    Well-Known Member

    Mar 2, 2015
    1,517
    1,070
    I'm not aware of any way to do that. Have you asked in the Arduino forums? Someone there might have a solution...
     
  3. MrAl

    Thread Starter Distinguished Member

    Jun 17, 2014
    3,139
    632
    Hi,

    No. Thought i might just get some ideas here.
     
Loading...