Simple way to read in csv data

I wanted to post this against this topic: A Simple Function for Reading CSV Text Files. - Storage - Arduino Forum bu it's too old for new replies, so I thought I'd post it here.

This reads in a known number of csv values, all strings. The readStringUntil function is quite handy for this sort of thing.

      char record[15];  //longest file name
      for (int i=0; i<FileNo; i++){
      Debug.print(DBG_DEBUG, "loadLogArray, i:%d. record %s \n", i, record);

Note, I purposely formatted my file so that it would have an ending ',' but it's easy enough to loop on less time and search for '\n' on the last one.

I am sorry for the question !!! It's my first project with Arduino.
I use Arduino to send SMS from csv files. where Should I download CSV files before using you function ?
Where should I add this function after download CSV file.??
Thank you

I use this code:

String message = "Message test";
String numero[2]= {"0000000000"", "0000000000""}; // Numéros des destinataires, changer le numéro dans la variable selon le nombre

void setup()

Serial.begin(9600); // demande d'activer le port principale
Serial2.begin(9600); // activer le port avec la vitesse 9600


void loop() // ca se repete indifiniment
for ( int a=0; a<2; a++){ // mettre le même numero qui correspond au numero de la variable dans la quel on a enregistrer les numéros
Serial2.print("AT+CMGF=1\r"); //Activation mode Texte
Serial2.print("AT+CMGS=""); //Numéro du destinataire
//Serial2.print(message);//Message à envoyer
Serial2.write("Hello"); //2eme methode pour envoyer un message
Serial2.write((char)26); //Envoi du message

while(1){ // Boucle infinie pour fin d'envoi



This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.