On an ESP32-CAM I have a 10K resistor from Vcc to GPIO13 and push button switch to a GND pin. Wiring all ok. However the wakeup doesn't work when the button is pressed. Is this because GPIO13 is used by the sd card, which is also used in the sketch? It seems every pin on the ESP32-CAM is used by something internal.
It actually seems to work if the button goes to the negative of the USB supply rather than GND of the ESP32-CAM. However, the flash doesn't work when the sd card is in one bit mode.
Hi, I think I have had this issue myself with the flash (was a long time ago now), I think it turned out to be that I had to set the gpio pin as output after the sd card was configured.
I changed a lot of things at the same time and it's now working.
Putting the sdcard into 1 bit mode freed up a lot of pins so I used:
VCC -> 10K resistor -> GPIO13 -> button -> GND
but it wouldn't wake on button press. I'm powering the board from a USB breakout board and it will only wake up if the button is connected to USB GND and not ESP32-CAM GND.
As for the flash, I think that was a red herring as the sdcard uses pin 4 when in 4 bit mode. In 1 bit mode it doesn't. I think the flash was actually the result of the SD_MMC module writing the photo to disk and not the camera taking the photo. That's why it no longer flashes when the sdcard is in 1 bit mode.
It's all the result of taking a tutorial at face value and it not working as it got more complex. Led to a lot of interesting research but at least I know a lot more about the ESP32-CAM now.
Just have to understand why it won't wake if the button is connected to ESP32-CAM GND. It does if it's connected to USB GND on the breakout board.
That's the problem I had. If GND3 (in the schematic in the discussion) is connected to USB GND the board won't boot so it won't wake on button press. I didn't use GND2 but I think it will work. GND1 works as that's where the USB GND is connected.