Arduino File.peek()

Description

The File.peek() function reads a byte from the file without removing it from buffer. Therefore, successive calls to peek() will return the same value. The File.peek() function inherits from the Stream utility class.

The File.peek() function inherits from the Stream utility class.

Syntax

file.peek()

Parameters

  • file: an instance of the File class that is returned by SD.open()

Returns

  • The next byte (or character), or -1 if none is available.

Example Code

//TO BE UPDATED

ARDUINO BUY RECOMMENDATION

Arduino UNO R3
Arduino Starter Kit
Please note: These are Amazon affiliate links. If you buy the components through these links, We will get a commission at no extra cost to you. We appreciate it.

※ OUR MESSAGES