Explain what you want to do exactly, because if you want to modify the title in the file, you will have to read and rewrite everything in the file, after that title (unless all titles are always the same length)
Anyway, if you want to read one line, you use the read() method in a while loop, until the result is a newline character
I just want to read a line that can vary in length. Someone suggested this code but I get an
error: 'class SdFile' has no member named 'readStringUntil'
this code worked to print out the first text line in the file. If I add while (myFile.available()) then all three lines get printed. thanks for helping me.
Once I get the song name from the sd card, I then want to pass it on to a webpage using Soft Access point protocol. Then when I select the SONG it will then play that tune .
I can't figure out how to insert the contents in the buffer into the HTML code. Currently it shows buffer on the webpage. Any ideas?
Someone suggested the following which works but seems really clunky.
There should be a way just to insert the contents of the buffer into the one line of code
buffer = titlesFile.readStringUntil('\n');
fred = "<a href=\"/1\"><var>";
alan = "</var></a><br><br>";
client.print(fred + buffer + alan);