Thank you in advance for your help. I swear this was working before. I loop through each line of the EEPROM and then pull out each of every 4 lines. After it loops through the entire eeprom, it just starts over from the beginning.
int LookForUidInEEPROM(){
Serial.println("inloop");
byte compare[4];
int count;
for (int i = 0; EEPROM.length(); i = i + 4){
compare[0] = EEPROM.read(i);
compare[1] = EEPROM.read(i+1);
compare[2] = EEPROM.read(i+2);
compare[3] = EEPROM.read(i+3);
// if(compare == GivenKey){
// return i;
// }else if(i >= EEPROM.length()){
// return -1;
// }
Serial.println(count);
count = count +1;
}
Serial.println("end of for loop");
delay(5000);
Serial.println("end of for loop");
}
Okay I miss read what you were saying. "And" is what I needed.
Although I'm still doing something weird with the data. It does work in a function that I made but in my main code I can't get it to work. And it's writing out something weird for the data