Arduino Forum

Using Arduino => Storage => Topic started by: Jdom1824 on Apr 17, 2019, 04:02 am

Title: Reading CSV position to sD
Post by: Jdom1824 on Apr 17, 2019, 04:02 am
I am trying to read the position of the csv file that is shown in the image with the following code. I hope someone can help me
Greetings David.

Code: [Select]
file = SD.open("1.csv");
int totalBytes=file.size();
//Serial.println(totalBytes); 
while(file.available()){
char caracter = file.read();
if(caracter == '\n'){
bandera = true;
}
if(bandera == true){
Prev = Prev + caracter;
if(caracter == ',')break;
}
}
bandera = false;
file.close();
Serial.println(Prev);
Title: Re: Reading CSV position to sD
Post by: neiklot on Apr 17, 2019, 06:02 am
Here's OP's pic:

(https://forum.arduino.cc/index.php?action=dlattach;topic=610555.0;attach=304231)

(OP, read this (http://forum.arduino.cc/index.php?topic=519037.0), for future reference.)

(OP, would you mind editing your post to fix that crazy mis-alignment?)