Welcome to ESP32 WiFi Camera Lite repository
4.MSPM0G3507 drives the servo gimbal
Mspm0g3507 remote control servo gimbal
Note: esp32 camera needs to be burned with factory firmware. If you have not flashed the firmware after receiving the esp32 camera, you do not need to use the factory default firmware
1. Experimental preparation
ESP32 camera
Mspm0g3507 development board
2-DOF gimbal
Dupont line
2. Wiring diagram
Note: Due to insufficient voltage, esp32 camera and Mspm0g3507 development board need additional power supply via type-c data cable
| Mspm0g3507 | esp32 camera |
|---|---|
| PA2 | RX |
| PA3 | TX |
| GND | GND |
| NC | 5V |
| Mspm0g3507 | s1 servo |
|---|---|
| PA13 | Signal line |
| 3.3V | |
| GND | GND |
| Mspm0g3507 | s2 servo |
|---|---|
| PA12 | Signal line |
| 3.3V | VCC |
| GND | GND |

Actual connection diagram:

3. Experimental steps and experimental results
Check whether the program runs normally
You can modify the WiFi name and password you want to connect to, as well as the name of the hotspot in the esp32_wifi.cpp file

Download the program of this project to the mspm0 board
Open the serial port assistant on the computer, open the computer to detect the serial port of mspm0, as shown below

After pressing the reset button of mspm0, the serial port assistant will print out the corresponding information

If only one mode is turned on, then sta_ip:null or ap_ip:null If sta_ip:null occurs, you need to check whether the connected wifi name and password are correct. If correct, is only one AP mode turned on, and not STA mode?
Use the app to control the movement of the car. After installing the "ESP32Cam" app, open it.
On the login page, set the IP address according to the IP address obtained by the serial port assistant. If the IP address obtained by the serial port assistant is "192.168.2.110", the configuration is as follows

Then click login directly
(Optional) If you want to connect to the hotspot of the wifi camera, the IP address must be set to 192.168.4.1, as shown in the figure

When the IP address is configured correctly and successfully connected, you can control the servo gimbal through the app console page
Horizontal screen

Note: Every time you restart the app, you need to click the exit button in the upper right corner, then exit and reconfigure the IP address information before logging in