Using EEPROM in loop

Hi!

I'm working on a project where I want to read a value from a potentiometer and after that save it to EEPROM.
Now I'm planning to use that saved value in the loop like this:

if(EEPROM.read == x){
  do y
}

So my question is if this is a good idea when the EEPROM has a life span of about 100 000 read/write functions?

As far as I know, it's writes not reads that are the problem.

And if you do an .update rather than a .write, it will only do a write if the value to be written differs from the one already there.

if(EEPROM.read == x){
  do y
}

That will not compile. And it is not a loop.

if(EEPROM.read(address) == x){
  do y
}

The EEPROM is good for 100,000 write operations, read operations are unlimited.

groundFungus:

if(EEPROM.read == x){

do y
}




That will not compile. And it is not a loop.



if(EEPROM.read(address) == x){
  do y
}





The EEPROM is good for 100,000 write operations, read operations are unlimited.

OK. Just wondered because if I put that "if" statement in the loop it will read the EEPROM every time the loop runs. But if the read operations are unlimited that should not be a problem

Thanks for the answers!