please help me, use the sd card

how to write down the value of three input into a CSV file and storing them to the SD card in the form of a CVS file.?
thank you

Have you looked at the SD library examples, in particular the datalogger example ?

A look at the SD card documentation will augur you well.
Nevertheless, use this to create the .csv file.


Implement this to store the values into the file.

String data=value_1+","+value_2+","+value_3;

Voila !

String data=value_1+value_2+value_3;No comma separators !

No comma separators !

Noted and corrected :slight_smile:

Better yet, don't use the String class. Just write the pieces:

if(datafile) {
  datafile.print( value_1 );
  datafile.print( ',' );
  datafile.print( value_2 );
  datafile.print( ',' );
  datafile.println( value_3 );

This saves about 1600 bytes of program space. And indent the code so everyone can read it easily.