The File.available() function checks if there are any bytes available for reading from the file. The File.available() function inherits from the Stream utility class.
The File.available() function inherits from the Stream utility class.
- file: an instance of the File class that is returned by SD.open()
- The number of bytes available ro read. The returned type: int
- 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: