Skip to main content
2 of 2
deleted 2 characters in body; edited title
dda
  • 1.6k
  • 1
  • 12
  • 18

Reading and comparing data from Arduino Uno EEPROM

I'm trying to read compare data from EEPROM (Arduino UNO). Reading is working fine but comparing it using the '==' operator is not working as expected.

//string 'True' is already stored in EEPROM

int addr = 0;
char value = EEPROM.read(addr);

Serial.println(value);// this line successfully prints the letter 'T'

// but this function is not working
if (value == "T") {
  Serial.println("foo");
}
smc
  • 203
  • 1
  • 5
  • 14