When the code excutes the file is not found making me think that other invisible charters maybe embeded in the "Star array". I have substituted the actual filename "CodesA.txt" and the file is found, so what is the difference infile names variable vs quoted?
char Star[9];
void RunOnce() {
Star[0] = 'C';
Star[1] = 'o';
Star[2] = 'd';
Star[3] = 'e';
Star[4] = 's';
Star[5] = 'A';
Star[6] = '.';
Star[7] = 't';
Star[8] = 'x';
Star[9] = 't';
Once = "99";
Serial.println(Star);
if (!SD.begin(SDpinout)) {
Serial.println ("NOT INITALIZED");
delay(3500);
return;
}
//CONTINUE TO FIND FILE
if (SD.exists(Star)) {
Serial.println("FILE EXISTS");
delay(3500);
}
CodeFile = SD.open(Star, FILE_READ);
if (CodeFile) {
Slen = (CodeFile.read());
CodeFile.close();
Serial.println(Slen);
}
}