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

Reading and comparing data from Arduino UNOUno EEPROM

I'm trying to read compare data from EEPROM  ( ArduinoArduino UNO  ). Reading Reading is working fine but comparing it using athe '==' 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");
}

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 a '==' 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");
}

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");
}
Source Link
smc
  • 203
  • 1
  • 5
  • 14

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 a '==' 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");
}