PICO 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 do so. The factory default firmware is used

1. Experimental preparation

2. Wiring diagram

Note: Due to insufficient voltage, esp32 camera and PICO development board need additional power supply via type-c data cable

pico motherboardesp32 camera
P4RX
P5TX
GNDGND
5V5V
pico motherboards1 servo
P18Signal line
3.3V 
GNDGND
pico motherboards2 servo
P19Signal line
3.3VVCC
GNDGND

image-20250114190519120

Physical connection diagram:

image-20250114185101377

PICO pin diagram:

image-20250114183127955

3. Experimental steps and results

Quick method: You can directly connect to the wifi opened by esp32. The name of this experiment is ESP32_WIFI_TEST. Then the IP address camera information of the mobile app is 192.169.4.1, and you can use the app to control the servo

  1. Open a thonny software, click Tools->Settings->Interpreter, and change it to your own port

image-20250122111505761

  1. Import the firmware library of the driving servo

Since some programs need to use third-party libraries to run normally, here is how to import third-party libraries into Pico 2. Importing the library only needs to be executed once, and there is no need to import it multiple times.

image.png

image-20250114191051019

image.pngimage.png

image-20250114191157969

  1. Open the code just uploaded and modify it to the wifi name and password you want to connect to. You can also modify the name of the hotspot and the corresponding wifi mode.

image-20250114190657145

  1. Run the program, and it will return the IP address of the current network connection and the address of the hotspot

image-20250114184145074

  1. Use the app to control the movement of the car. After installing the "ESP32Cam" app, open it.

image-20250122111540299

image-20250122111531748

Horizontal screen

image-20250122111523415

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