I am new to Arduino.
I would like to save data that is in a variable, say of type String (say - myString) in to flash after checking that the string value is not already in the flash. I think I should use PROGMEM but i dont how. I want also to be able to delete the data when I do not need it any more and use that area for other storage in the future. It should be available even after power off followed be power on. Please assist with a sample.
If you want to delete the data and replace it with something else, you need to look at the EEPROM, PROGMEM is for read only use.
Oh!...but I read somewhere that EEPROM has a max of 100,000 read/write cycles... =(
Never mind, will have to use EEPROM Then. Any sample for EEPROM?
Zahir:
Oh!...but I read somewhere that EEPROM has a max of 100,000 read/write cycles... =(
Never mind, will have to use EEPROM Then. Any sample for EEPROM?
Yes, 100,000 read/write cycles, which means that you should not be writing to it every few milliseconds.
Have a look at the EEPROM library that came with your Arduino IDE. It's in the libraries directory. There are example sketches in there.