read int/long from sd card

Here is basic example, hope it helps :slight_smile:

char fileStr[] = "987654"; // example of what is in the file

char result[7]; // value are between 0/999940? so lenght is 6 characters + 1 ('\0')
uint8_t i = 0; // a counter

while (fileStr[i] != '\0') // while character isn't the string terminator
{
  result[i] = fileStr[i]; // store character in result
  i++; // increase counter
}

unsigned long number = atol(result); // convert result string to numeric value
Serial.print(number); // print the number