I want the following code (a function) to print something like this:
1 = 2
4 = 2
1 = 3
5 = 6
void printKey() {
Serial.println(EEPROM.read(1) & " = " & EEPROM.read(5));
Serial.println(EEPROM.read(2) & " = " & EEPROM.read(6));
Serial.println(EEPROM.read(3) & " = " & EEPROM.read(7));
Serial.println(EEPROM.read(4) & " = " & EEPROM.read(8));
}
However, it is not working. If I do it like this:
void printKey() {
Serial.println(EEPROM.read(1) + " = " + EEPROM.read(5));
Serial.println(EEPROM.read(2) + " = " + EEPROM.read(6));
Serial.println(EEPROM.read(3) + " = " + EEPROM.read(7));
Serial.println(EEPROM.read(4) + " = " + EEPROM.read(8));
}
It somehow grabs other Serial text and scrambles it. Whats going on and how can I make it do this:
1 = 2
4 = 2
1 = 3
5 = 6
Thanks!