End goal: I want to wake up the ESP32 based on a PIR motion sensor, do something and then if motion is still detected do it again until there is no more motion. When that is done it should send 2 PWM signals (using 2 pins total) and an activation signal (1 pin).
I'm able to read from pin 13 with digital read which I have the motion sensor signal hooked up to. As long as I don't set pins 14 or 15 to output it works but as soon as I set them to output pin 13 stops reading.
There are very limited pins on the Ai-Thinker ESP32-CAM and according to ESP32-CAM AI-Thinker Pinout Guide: GPIOs Usage Explained | Random Nerd Tutorials pin 13 is used for the SD card if it's in use but I am not using it and have not called any functions to initialize it. That means it should be available. I'm also using it to wake the board up from a deep sleep and that works (other pins such as 12 do not work for that in my experience) but once the board is woken up once and pins 14 and 15 set to output then everytime afterwards even after waking up from deep sleep pin 13 is not readable.
Setting pin 2 as output however does not affect Pin 13's ability to perform a digital read.
Thanks for any help, tips or advice. This problem has been perplexing me for a couple days now.