Compile error for AI Thinker ESP32-CAM card

Contrary to the comments, your error is quite clear from the message and code:

You are trying to use a C library function getc with a ESP32 library object File.

That is impossible. getc can not work with this object, or any C++ object because it is a C function.

To read from the file object, you need to use its method read like this:

header[i] =;

You should read the library documentation for more information on how to use the File object, or see this tutorial on working with SD card:

CLICK HERE to find out more related problems solutions.

Leave a Comment

Your email address will not be published.

Scroll to Top