Code folder has four codes in which the first code is for ESP32 and peripherals connected to ESP32 the second code is for the HTML web page, the third code is for camera index, and the fourth code is for camera pins.ĭownload the complete code files from here and check the demonstration video below.Home security and monitoring systems have helped us feel more confident about leaving our homes unattended for long periods of time. Complete code and demonstration video is given below. This is how you can make a surveillance robot using ESP32-CAM. It will take you to the web page.įrom here, you can control the car using the control buttons while receiving video streaming from a web browser. Now to access the Webpage for ESP32 video streaming and car controls, navigate to your browser and enter the ESP IP address.
After that press the ESP32 reset button, it will print the ESP IP address and port no on the serial monitor. Then open the serial monitor and change the baud rate to 115200. Note: If you get errors while uploading the code, check that IO0 is connected to GND, and you have selected the right settings in the Tools menu.Īfter uploading the code, disconnect the IO0 and GND pin. Also, change the other settings according to this picture:īefore uploading the code, press the ESP32 reset button and then click on the upload button. To upload the code, connect the FDTI board to your laptop and select the ‘ ESP32 Wrover Module’ as your board. Inside the void setup loop, begin the serial monitor and set the DC motors initially low.Ĭonnect to the Wi-Fi using the given credentials and wait for the confirmation The four pins 4, 2, 14, and 15 of the ESP32 are used to control the DC motors.
Here we have used the AI Thinker camera model that comes with ESP32.Įnter the Wi-Fi name and password of the network. Uncomment the camera model that you are using. In the code, three camera models are defined. One is the main code file for camera and motors, and the other three codes are for web page, camera index, and camera pins.īegin the program by including header files and selecting the right camera model. This ESP32 Surveillance Camera has a total of four code files that are attached at the end of the project and also can be downloaded from here.
In Boards Manager search for ESP32 and install the “ESP32 by Espressif Systems“. Now copy the below link and paste it into the “Additional Board Manager URLs” field, as shown in the image below. To install the ESP32 board in your Arduino IDE, go to File> Preferences For that, we have to install the ESP32 add-on on Arduino IDE. We will program the ESP32-CAM using Arduino IDE.
This is how my surveillance robot looks like: We used a battery to power the motor drive module and ESP32-CAM. We built a robot by using a ready-made robot chassis, wheels, and DC motors. When GPIO 0 is connected to GND, the ESP32 is in flashing mode. IO0 determines whether the ESP32 is in flashing mode or not. Note: Before uploading the code, connect the IO0 to the ground. Module pins are connected to IO4, IO2, IO14, and IO15 pins of ESP32. Two DC motors are connected to ESP32 through the L293D module. Tx of and Rx of ESP32 is connected with Rx and Tx of the FTDI board. VCC and GND pin of ESP32 is connected with the VCC and GND pin of the FTDI board. The web page will also have buttons to move the car in Left, Right, Forward and reverse directions as shown in the image above.Īlso, download and install the Arduino IDE to upload the into ESP32.Īll the connections for ESP32- Surveillance Camera is given below:ĮSP32-CAM doesn’t have a USB connector, so you need an FTDI board to upload the code into ESP32-CAM. Here HTTP communication protocol will be used to receive video streaming from the OV2640 camera over the web browser. MicroSD card slot can be used to store images taken from the camera.
The AI-Thinker ESP32-CAM module comes with an ESP32-S chip, a very small size OV2640 camera and a microSD card slot.