This small-size programmable camera can start taking pictures when motion is detected and transmit real-time videos. It can be hidden easily for espionage work due to its tiny size.
The webserver camera can be designed in two versions. The first version described here can send real-time video over Wi-Fi. The author’s prototype is shown in Fig. 1.

Next, open Board Manager, search ESP32 and install the board to Arduino IDE. After installing the latest Arduino IDE and selecting board for ESP32, if you go to “file→example→ esp32→camera→webserver” you will see the ESP32 webcam project, which is already available there.
Upload the code to ESP32 cam and search the address of ESP32 cam in the web browser. You can see the live video from ESP32 cam.
Adding OLED display
In the original code of ESP cam there was no multiplicity of Wi-Fi network choices and there was no way to know the IP address of the webcam, unless it was connected to a PC to see the serial terminal output. So, you can modify the code and add the code for the ESP32 to automatically connect to the best available Wi-Fi among all the networks in range.