Go Down

Topic: How to store an integer without sd card ? (Read 92 times) previous topic - next topic

nurimo

Hi, I have a simple application. I will not go through all of my code. My code is designed to interact with a windows form application through Bluetooth and USB. From this program, the user can send a set of integers and the Arduino acts according to these integers. But if I reset the Arduino, all values go back to initial values. I need to store these values even in the power down situation, it should be able to restore the values and use them until the user makes a change on the values. I do not want to write these values over and over again in the loop. I will just change the values if any change has been made by the user. If no change has been made, then I will just use the values in the program.

gpop1

you can save the values in eeprom and reload from setup. There is a 10,000 times write limit on the arduino so make sure your code only saves when the data in the int has been changed rather than doing it every loop.

look under the learning tab about eeprom

nurimo

you can save the values in eeprom and reload from setup. There is a 10,000 times write limit on the arduino so make sure your code only saves when the data in the int has been changed rather than doing it every loop.

look under the learning tab about eeprom
Thank you very much for your help. I did not realize there is a topic on eeprom. It helped a lot. I will make changes to the code and post the result here. Thanks again.

dougp

There are also algorithms to implement 'eeprom wear leveling' to extend the useable life of the eeprom.

Go Up