Dear all,
I have a problem with a program that I am developing I am using and Arduino Ethernet Shield with the incorporated SD.
In the program, I storage in the SD card some values of the an accelerometer, the number of these values are aleatory depending of the test duration. The values are properly storage in a file.
After of this storage, I need verify the values stored for do it I need open the file and read these values.
The opened file has the next values:
192.txt
705;546;437
426;402;385
307;291;303
257;245;254
232;225;230
221;218;221
216;214;216
215;214;415
221;222;223
224;225;226
228;229;229
I would like, storage in a first array ax
the first colum, in the ay the second and in the az the last column of values. I need do it some matematics calculus with these arrays.
By the moment, I has the next code opening the file but I have really problems in storage the values as I comment previously.
File myFile = SD.open(nomfichero);
if (myFile) {
Serial.println(nomfichero);
while (myFile.available()) {
Serial.write(myFile.read());
}// close the file:
myFile.close();
} else {
// if the file didn't open, print an error:
Serial.println("error opening test.txt");
}
I read in some foros that exist the function strocke and atof but I don't know how this functions operate.
I am very thankfully some ideas about my problems.
Thanks and regards.