I want to send settings for my firmware through the serial port to Arduino for saving in EEPROM, so that I don't have to recompile the source code and reload firmware when I want to change some code parameter. Is any sample project available for this?
Yes there is. What did GOOGLE return to you when you asked it 'Arduino send serial data and store in EEPROM'?
Right on! That is what the EEPROM is for, storing data not storing programs. Programs are stored in flash. EEPROM stands for Electrically Erasable Programmable Read-Only Memory. The microcontrollers used on most of the Arduino boards have either 512, 1024 or 4096 bytes of EEPROM memory built into the chip. This memory is non-volatile, which means that the data doesn’t get erased when the board loses power.
You can look at the EEPROM on Arduino as an array where each element is one byte. When reading from and writing to this memory, you specify an address which in the Arduino world is equivalent to an array index.
Arduino EEPROM has a total lifetime of ~100,000 write cycles. Be careful when writing code so that you don’t write to EEPROM too often! Remember that erasing memory also is a writing operation. I always use the update rather then the write, that way it only writes if the data changes.
Try this search term: arduino storing data in eeprom you will get a lot of hits some showing the code needed to do this.
Robin's updated serial input basics can provide a guide to receiving and parsing data. After that, it a matter of saving to EEPROM using the put method and retrieving using the get method.
This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.