Comments on: ESP32-CAM Take Photo and Save to MicroSD Card with Date and Time (timestamp) https://randomnerdtutorials.com/esp32-cam-photo-microsd-card-timestamp/ Learn ESP8266, ESP32, Arduino, and Raspberry Pi Wed, 26 Nov 2025 00:58:37 +0000 hourly 1 https://wordpress.org/?v=6.8.5 By: Robert https://randomnerdtutorials.com/esp32-cam-photo-microsd-card-timestamp/#comment-1127524 Wed, 26 Nov 2025 00:58:37 +0000 https://randomnerdtutorials.com/?p=125386#comment-1127524 I have an ESP32 board with built in camera, SD card socket, antenna extender attached and of course WiFI & Bluetooth. What I don’t have unfortunately is the board manufacturer’s name. Silk-screened on the board under a heading of TF CARD is the following: SD_CS100 SD_CLK1021 SD_MISO1023 SD_MOSI1019. I assume that these are the pins used for the SD card access. The last three presumably refer to pins 21, 23 and 19. I don’t know what to make of SD_CS100. I have tried using 10 as the chip select in the sketch which includes user defined pin numbers but get an error. The sketch uploads and produces this error:
rst:0x1 (POWERON_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:2
load:0x3fff0030,len:1184
load:0x40078000,len:13232
load:0x40080400,len:3028
entry 0x400805e4
[ 329][E][sd_diskio.cpp:199] sdCommand(): Card Failed! cmd: 0x00
[ 336][E][sd_diskio.cpp:806] sdcard_mount(): f_mount failed: (3) The physical drive cannot work
[ 645][E][sd_diskio.cpp:199] sdCommand(): Card Failed! cmd: 0x00
Card Mount Failed

Any clues as to what is going on? I have tried compiling and uploading the sketch numerous times changing the chip select pin from 1 through 16 and get variations of the error and for some pin selections constant re-booting. Thanks for any guidance you can provide.

]]>
By: Sara Santos https://randomnerdtutorials.com/esp32-cam-photo-microsd-card-timestamp/#comment-1107748 Thu, 09 Oct 2025 09:20:25 +0000 https://randomnerdtutorials.com/?p=125386#comment-1107748 In reply to Thomas Fischer.

Hi.
What actual board did you select in Tools > Board?

Regards,
Sara

]]>
By: Thomas Fischer https://randomnerdtutorials.com/esp32-cam-photo-microsd-card-timestamp/#comment-1107743 Thu, 09 Oct 2025 08:55:43 +0000 https://randomnerdtutorials.com/?p=125386#comment-1107743 Very good tutorial, thank you!
I tried to load it on my AI Thinker ESP-32 CAM and get following failure messages:

C:\Arduino\esp32-camera-sd\esp32-camera-sd.ino: In function ‘void configInitCamera()’:
esp32-camera-sd:55:10: error: ‘struct camera_config_t’ has no member named ‘pin_sccb_sda’
config.pin_sccb_sda = SIOD_GPIO_NUM;
^
esp32-camera-sd:56:10: error: ‘struct camera_config_t’ has no member named ‘pin_sccb_scl’
config.pin_sccb_scl = SIOC_GPIO_NUM;
^
esp32-camera-sd:61:10: error: ‘struct camera_config_t’ has no member named ‘grab_mode’
config.grab_mode = CAMERA_GRAB_LATEST;
^
esp32-camera-sd:61:22: error: ‘CAMERA_GRAB_LATEST’ was not declared in this scope
config.grab_mode = CAMERA_GRAB_LATEST;
^
Mehrere Bibliotheken wurden für “WiFi.h” gefunden
Benutzt: C:\Users\Thomas Fischer\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.6\libraries\WiFi
Nicht benutzt: C:\Program Files (x86)\Arduino\libraries\WiFi
Nicht benutzt: C:\Users\Thomas Fischer\Documents\Arduino\libraries\WiFiEspAT
exit status 1
‘struct camera_config_t’ has no member named ‘pin_sccb_sda’

]]>
By: Owain https://randomnerdtutorials.com/esp32-cam-photo-microsd-card-timestamp/#comment-1014976 Sun, 09 Mar 2025 10:51:44 +0000 https://randomnerdtutorials.com/?p=125386#comment-1014976 Great tutorial, absolutely crystal clear, thanks!

One small problem I had: a 4GB card formatted as a single volume couldn’t be mounted. Reformatting with a 512MB partition worked.

]]>
By: Stephan https://randomnerdtutorials.com/esp32-cam-photo-microsd-card-timestamp/#comment-941120 Tue, 23 Jul 2024 22:05:38 +0000 https://randomnerdtutorials.com/?p=125386#comment-941120 Hello Sara and Rui! Another great project. Thank you. Like many others have tried to use a RTC (internal or external) to grab the time from for the file name, so the camera can be used with a IR trigger where there is no WiFi. Is it a lost cause, because of the limited pins available when using the SD card? If there was a way, the internal RTC could be used while taking photos, and updated once in a while when it comes within wifi? Thank you!

]]>
By: Viktor https://randomnerdtutorials.com/esp32-cam-photo-microsd-card-timestamp/#comment-921935 Wed, 05 Jun 2024 23:21:06 +0000 https://randomnerdtutorials.com/?p=125386#comment-921935 In reply to Sara Santos.

Thank you,
these are great examples for people’s eventual personal projects.

I’d like to use ESP32CAM as security camera which uploads images to a server when alert is triggered. For the case when intruder locates the camera and steals it. However pictures should also be saved on SD card. For the case that intruder turns off electricity and there is no WIFI connection. Each camera will be battery powered so it won’t shut down and can keep doing its job.
I have not found similar project on github yet, so I would like to work on it myself. But it’s very challenging if you have close to zero knowledge of C++, PHP or other programing languages required.
With your examples I have at least something that I can work with. Let’s see how far I can go to make my case scenario happen.

]]>
By: Sara Santos https://randomnerdtutorials.com/esp32-cam-photo-microsd-card-timestamp/#comment-921683 Wed, 05 Jun 2024 09:35:59 +0000 https://randomnerdtutorials.com/?p=125386#comment-921683 In reply to Viktor.

Hi.
You can try to implement something like this: https://randomnerdtutorials.com/esp32-datalogger-download-data-file/
Or like this:
https://randomnerdtutorials.com/esp32-cam-http-post-php-arduino/
https://randomnerdtutorials.com/esp32-cam-display-pictures-firebase-web-app/
Regards,
Sara

]]>
By: Viktor https://randomnerdtutorials.com/esp32-cam-photo-microsd-card-timestamp/#comment-921622 Wed, 05 Jun 2024 00:57:03 +0000 https://randomnerdtutorials.com/?p=125386#comment-921622 This is cool! Great tutorial.

Let’s say I am lazy and don’t want to remove the SD card and view/download pictures from remote host. Is there any option to implement some FTP/SMB server that will allow me to do that?

]]>
By: Carson https://randomnerdtutorials.com/esp32-cam-photo-microsd-card-timestamp/#comment-874706 Tue, 28 Nov 2023 13:14:05 +0000 https://randomnerdtutorials.com/?p=125386#comment-874706 once the SD card is full of pictures, do you have/do you know a function or an additional code which erase the oldest pictures/overwrite on it?

]]>
By: Michiel van Duin https://randomnerdtutorials.com/esp32-cam-photo-microsd-card-timestamp/#comment-864973 Tue, 10 Oct 2023 13:34:06 +0000 https://randomnerdtutorials.com/?p=125386#comment-864973 In reply to Miles.

The tutorial really helped me too! Thanks @SaraSantos!
I did find out how to disable the flash, however I do not completely understand why.
I replaced: “if(!SD_MMC.begin()){” with:
“if(!SD_MMC.begin(“/sdcard”, true)){ //adding “/sdcard”, true turns the LED that is used as flash off, removing this enables the flash”

Reference: reddit.com/r/esp32/comments/nvgt1p/disabling_auto_flash_on_the_esp32_cam/

]]>