I have a char array in which reads data from some EEPROM device, in hardware, and if there is no data in there, its value can be anything (garbage).
I would like to check if his value is not garbage and have some valid chars.
for(int k=address;k<address+MEM_MAX_LEN;k++)
{
charBuf[k-address]= EEPROM.read(k);
if(charBuf[k-address]=='*')
{
charBuf[k-address]='\0';
break;
}
When using strlen>1
I don't get the desired respond (obviously).
How can I check it?