Go Down

Topic: Reading CSV position to sD (Read 241 times) previous topic - next topic

Jdom1824

Apr 17, 2019, 04:02 am Last Edit: Apr 17, 2019, 11:31 pm by Jdom1824
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);

neiklot

Here's OP's pic:



(OP, read this, for future reference.)

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




Go Up