Hi there, Got a few questions, mostly to do with writing, reading, and updating values in EEPROM but also to do with an LCD using liquid crystal.
My problem:
I have 5 values that I need the ability to change with the LCD then write them to EEPROM. On setup I want the EEPROM to update these variables so that they contain the last updated information.
Would I have to call the variables one by one in the setup or is there a possibility for an array?
ex.
Timer1INV = EEPROM.read(address, Timer1IND);
Timer1INV is my main variable thats gonna be used
address is the location in the EEPROM of the variable
Timer1IND is the variable in the EEPROM
You can use an array, but you need to be mindful that read() returns a byte data type. If your data fits within the limits of a byte, just make a 5 element byte array. If something other than a single byte holds the data of interest, take a look at the EEPROM.get() method.
econjack:
You can use an array, but you need to be mindful that read() returns a byte data type. If your data fits within the limits of a byte, just make a 5 element byte array. If something other than a single byte holds the data of interest, take a look at the EEPROM.get() method.
So just clarification one more time.
int i[] = {0, 1, 2, 3, 4}
for (i = 0; i < 5; i = i + 1){
EEPROM.read(i, x);
}
This array would store the values from 5 locations of the EEPROM into 5 locations of X?