Welcome to ESP32 WiFi Camera Lite repository
Raspberry Pi
Raspberry Pi 5 configure camera
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
- A Raspberry Pi 5 main controller
- An esp32 camera
2. Wiring diagram
| Raspberry Pi 5 | esp32 camera |
|---|---|
| BOARD3 | SDA |
| BOARD5 | SCL |
| GND | GND |
| 5V | 5V |

Physical connection diagram:

Raspberry Pi pin diagram:

3. Experimental steps and experimental results
- Open a new Raspberry Pi terminal and send the source code of this experiment to the Raspberry Pi
- Open the code just uploaded, and change the position of the arrow in the figure to the corresponding AI mode.

- Execute the following instructions, and the default data will be returned. This is because the camera recognition is not turned on.
xxxxxxxxxxpython3 I2C_TEST.py

- Log in through the wifi ip configured by the serial port, or through the hotspot connected to the camera. Because wifi has been configured before, the following figure directly uses the previously configured wifi ip address to log in to the webpage and open the camera

- Because we set it to cat and dog mode, we put the cat or dog in front of the camera and the cat or dog will be selected.

At the same time, the terminal will print out the current center coordinates and the area has been selected.

Face recognition mode
When switching to face recognition mode, the terminal will additionally print the current face id

xxxxxxxxxxpython3 I2C_TEST.py

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 terminal will print out the current center coordinates and the recognized face.

Color detection mode
When we switch to color detection mode,

xxxxxxxxxxpython3 I2C_TEST.py

Recognize 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 currently selected color, and a red frame will appear.

At the same time, the terminal will print out the current center coordinates.
