writing a string to a text file

Hi there,

If I have a string how would I write it to a text file? I have an SD card in my board.

Kind regards
Conor

Did you try the "ReadWrite" example from the SD library?
It writes a string to a .TXT file

myFile = SD.open("test.txt", FILE_WRITE);
  
  // if the file opened okay, write to it:
  if (myFile) {
    Serial.print("Writing to test.txt...");
    myFile.println("testing 1, 2, 3.");
	// close the file:
    myFile.close();

read this

Why are you doing things backwards? You first try to learn how to make a string to store on an SD. But apparently you don;t know anything about storing things on an SD. You have to know how pieces of your project work before you start making a single line of code....