code that takes pictures when there is movement, does not take pictures when the

Hello people…
I have an ESP32-cam, connected to a USB TO TTL FT232RL, and a PIR Sensor SR505.
I put the code “ESP32-CAM-PIR-Photo-Capture” by author RuiSantosdotme, but he is taking pictures “when he wants” and not when he has movements. I believe it is something with this part of the code …
Serial.println (“Going to sleep now”);
delay (1000);
esp_deep_sleep_start ();
Serial.println (“This will never be printed”);

It is my first project with the ESP32-cam.

What do I do? Is it something in the code?



Did you put 2 or 3 layers of black tape over the PIR sensor to see if you still get pictures?