This is the scenario of used/unused pins of ESP-WROOM-32 Module when seen togethr with Camera, PSRAM, and SDCard: (Prepaerd consulting the schematic of ESP32-CAM Module, Fig-1.)
#/GPIO_ESP-WROOM-32_Module UsedByCAM UsedByPSRAM usedBySDCard
1/GND
2/3.3V
3/EN
4/36----------------------------Yes(CAM)
5/39----------------------------Yes(CAM)
6/34----------------------------Yes(CAM)
7/35----------------------------Yes(CAM)
8/32----------------------------Yes(CAM)
9/33--free(driving)onboard_LED
10/25---------------------------Yes(CAM)
11/26---------------------------Yes(CAM)
12/27---------------------------Yes(CAM)
13/14--(free if SDCard not used)-------------------------Yes
14/12--(free if SDCard not used)-------------------------Yes
15/GND
16/13--(free if SDCard not used)-------------------------Yes
17/9------------------------------------Yes(PSRAM)
18/10----------------------------------Yes(PSRAM)
19/11-------free--------------
20/6--------free-------------
21/7------------------------------------Yes(PSRAM)
22/8------------------------------------Yes(PSRAM)
23/15--(free if SDCard ot used)-------------------------------Yes
24/2---(free if SDCard not used)------------------------------Yes
25/0-----------------------------Yes(CAM)
26/4--(free if SDCard and Flash Bulb not used)---------Yes
27/16------------------------------------Yes(PSRAM)
28/17------------------------------------Yes(PSRAM)
29/5-----------------------------Yes(CAM)
30/18---------------------------Yes(CAM)
31/19---------------------------Yes(CAM)
32/NC
33/21--------------------------Yes(CAM)
34/3------free after uploading--
35/1------free after uploading--
36/22------------------------Yes(CAM)
37/23------------------------Yes(CAM)
38/GND
Right! That pin (righ-bottom and falsely marked as GND) of CAM Board is connected with EN-pin of ESP-WROOM-32 Module (for my CAM Module).
Right! Those GPIO lines (6, 11) of ESP-WROOM-32 Module are indeed connected with off-chip flash memory (Fig-1).
Figure-1:
Ultimately, the ESP32-CAM Module has 8 (+1) free GPIO lines if SDCard/Flash_Bulb and onboard LED are not used.
Practically, it is beyond one's ability to unfold the Metallic box of the ESP-WROOM-32 Module and bring out two free GPIO37 and GPIO38 lines from Pin-6 and 7 of the ESP32 MCU (Fig-2).
To @srnet, I am extending my humble gratitude for exercising his wise and smart way of bringing me out-of darkness of the statuses of the GPIO lines of the ESP-WROOM-32 Module.
When you set the second initializer attribute to ‘true’ you’re saying that SD card will run in ‘1-line’ mode. This apparently suggests that SD card would continue to be accessible in a slower or less versatile mode, but I have not tested it.
Anyway, after that code line, you can use pins 12 and 13 like any other I/O pin. I’ve done it, and it works.