2-Axis Pan-Tilt Camera Module Secondary Development Tool Usage
2-Axis Pan-Tilt Camera Module Secondary Development Tool Usage
This tutorial introduces the installation and usage of secondary development tools, explaining how to upload modified demos to pan-tilt. Users can perform secondary development on the open-source pan-tilt demo. The development tool introduced here is the Arduino IDE. The following outlines the installation and usage of dependency library and other environments in the Arduino IDE.
What's Arduino IDE
Arduino IDE (Integrated Development Environment), a development platform based on open-source code, features its own language and development environment. Due to the extensive libraries provided by the Arduino IDE, complex components such as displays and sensors, as well as software platforms, are easy to use.
How To Install
Download Arduino IDE
Go to Arduino website to download the latest version. The official IDE supports downloads for different operating systems, so choose the one that matches your operating system. Here, we're downloading for Windows. If it's already installed, skip to the second step. The installation process is straightforward; simply keep clicking "Next" until completed.
Note: During the installation process, you may be prompted to install drivers. Simply continue clicking "Install" until the process is complete.
Install Development Environment
The main control module of the drive board on the pan-tilt is ESP32, so we need to install the corresponding development board support for ESP32 in the Arduino IDE development environment. The steps are as follows:
1. Open Arduino IDE, click on "File" → "Preferences".
2. Add the following link to the Additional boards manager URLs, then click "OK" to save the settings.
https://dl.espressif.com/dl/package_esp32_index.json
Note: If you need to add multiple development board URLs, you don't need to delete the URL for ESP32 development board support. You can directly add other URLs on another line. By default, URLs will be displayed separated by commas.
For example: If you need to add the URL on the ESP8266 development board, simply add the additional URLs on separate lines, and it will display as follows:
https://dl.espressif.com/dl/package_esp32_index.json, http://arduino.esp8266.com/stable/package_esp8266com_index.json
3. Click to download ESP32 development package and unzip. Input the following path on "my computer":
C:\Users\username\AppData\Local\Arduino15
The "username" needs to be changed according to your computer's username. Create a new folder named "packages" and copy the extracted folder of the ESP32 development package into the "packages" folder.
You can see that the installed ESP32 development board version from "packages-esp32-hardware-esp32" is version 2.0.11, which matches the version required for the open-source demo development board ESP32 of the 2-Axis Pan-Tilt Camera Module.
Install Dependency Library
Download libraries, unzip them, and open the default Arduino installation path: C:\Users\username\AppData\Local\Arduino15\libraries (please according to your actual path), and then copy the files on the figure to the "libraries" folder.
Upload Demo
1. Download the Slave demo, unzip it and double-click pan_tilt_base_v0.9.ino. Note that all files in this directory should be placed within the same folder.
2. Click on "Tools" → "Port" and take note of the COM port already listed on your computer. Do not click on this COM port. (At this moment, there are three COMs displayed on my computer; the COM ports may differ on different computers.)
3. Connect the drive board of the pan-tilt to your computer using a USB cable (ensure it's connected to the USB port in the middle). Then, click on "Tools" → "Port" and select the newly appeared COM port (in my case, it's COM31).
4. In Arduino IDE, click on "Tools" → "Board" → "esp32" → "ESP32 Dev Module".
5. Click on "Tools", other settings as shown below: (For the Partition Scheme, it's recommended to use "Huge APP" and ensure that PSRAM is set to "Enabled.")
6. After all settings are configured, click "Upload" to upload the program to the drive board of the pan-tilt.
If you encounter problems during the upload process and need to reinstall or change the Arduino IDE version, it's important to uninstall the Arduino IDE completely. After uninstalling the software, you'll need to manually delete all contents within the folder "C:\Users\username\AppData\Local\Arduino15" (some hidden files need to be displayed to be visible). Then, proceed to download and reinstall the Arduino IDE.