The File.read() function reads a byte or a number of bytes to from the file to buffer.
The File.read() function inherits from the Stream utility class.
- File: an instance of the File class that is returned by SD.open()
- Buf: an array of characters or bytes
- Len: the number of elements in buf
- The next byte (or character), or -1 if none is available.
- 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: