Hi everyone,
I'm writing a sensor log in a TXT file in a SD card. So, I write 1, 2, 3 in a TXT File... So far, so good 8)
But, I need to read this log and store into a int... Here is my problem... The value stored is only the last character. If has a 15 stored in file, the int returns 5.
int ior() {
int data;
myFile = SD.open("approved.txt");
if (myFile){
while (myfile.available()){
data = myFile.read();
}
}
return (data);
}
Somebody could help me?
Thanks in advance...