The File.readStringUntil() function reads characters from a file into a String. The function terminates if the terminator character is detected or it times out (see setTimeout()).
The File.readStringUntil() function inherits from the Stream utility class.
- file: an instance of a class that inherits from File.
- terminator: the character to search for. Allowed data types: char.
- The entire String read from a file, up to the terminator character
Notes and Warnings
The terminator character is discarded from the return
- Connect the SD Card to your your PC via an USB 3.0 SD Card Reader
Create a arduino.txt file with the below content
- Connect SD Card to Arduino. See Arduino - Micro SD Card tutorial
- Upload below code to Arduino via Arduino IDE
- Open Serial Monitor, you will see as below: