Welcome to ESP32 WiFi Camera Lite repository
Arduino
Cat and dog detection
Note: The esp32 camera needs to be burned with factory firmware. If you have not flashed the firmware after receiving the esp32 camera, it is not necessary. The factory default firmware, before using iic communication, you can use the serial port to configure the network for the esp32 camera, and iic is used for data reading
1. Experimental preparation
- One arduino board
- One esp32 camera
2. Wiring diagram
| ARDUINO | esp32 camera |
|---|---|
| SDA | SDA |
| SCL | SCL |
| GND | GND |
| 5V | 5V |
Actual wiring diagram:


3. Experimental steps and experimental results
- Connect the Arduino device to the ArduinoIDE compilation platform. If you can see the serial port number, it is normal.

- In the .ino file, change it to the corresponding ai mode.

- Click Compile and Download to download the program to the uno motherboard. If the download is successful, the following picture will appear

- Open the uno ide serial port to view the data. x: 160, y: 120 are the default data.


- Open the camera and connect to the hotspot released by esp32

Then enter http://192.168.4.1:81/stream through the browser to access the camera screen

- Identify cats and dogs. If the recognition is successful, the current center coordinates will be printed out, and the cat image will be placed in front of the previous screen.

At the same time, the uno terminal will print out the current coordinates,

Face recognition mode
When switching to face recognition mode,

Click compile and download, download the program to the uno motherboard, and the following picture will appear if the download is successful

Open uno View data through the ide serial port, x: 160, y: 120, id: 0 is the default data.


Recognize face. When you see a face, press the key button to record the face

The following picture appears, which means the recording is successful, and the face 1 is recorded

At this time, you can press and hold the button for two seconds, then release it and press the button again to recognize the current face

At the same time, the uno terminal will print out the current center coordinates and the recognized face.

Color detection mode
When switching to color detection mode,
Click Compile and Download, download the program to the uno motherboard, and the following picture will appear if the download is successful

Open the uno ide serial port to view the data, x: 160, y: 120 is the default data.


Identify the color. Press the button and a box will appear. You can use this box to select the color you want to use.


Press and hold the button for two seconds, release it and press it again to identify the color currently selected. At the same time, a red box appears,

At the same time, the uno terminal will print out the current coordinates,
