Really simple code, wheat went wrong?

Im playing around with the internal eeprom. I wrote a simple code to check the value of the first address of eeprom. If its either a 0 or 255, check the analog pin and write that new value to eeprom. I get a different value every time that eeprom address is checked. where am i messing up?

The values, as seen by the serial monitor, are all over the place, ie. 102, 81, 100, 105...

Why does it keep changing?

#include <EEPROM.h>
byte calibration;
byte newcalibration;

void setup()
{
  Serial.begin(9600);
  #define address 0
  #define analogPin 3
}

void loop()
{
  calibration = EEPROM.read(address);

    if (calibration = 0 || 255) 
  {
    delay(100);
    calibration = analogRead(analogPin) / 4;
    EEPROM.write(address, calibration);
    delay(100);
    //calibration = EEPROM.read(address);
   } 
  Serial.print(address);
  Serial.print("\t");
  Serial.print(calibration);
  Serial.println();
  delay(1000);
}

Using the output from the ADC for testing does not make sense - there can be wide variation in the values for lots of reasons.

Try writing a fixed number to the EEPROM and see if that works. Or, if you want to confirm that different values can be saved, have a variable the increments every 2000 millis().

...R

if (calibration == 0 || calibration == 255)

is exactly what I meant, thank you. I also meant "==", the single "=" was just a mistype.