RoArm-M3-S Secondary Development Tool Usage

From Waveshare Wiki
Jump to: navigation, search

RoArm-M3-S_Secondary Development Tool Usage

This tutorial introduces the installation and use of secondary development tools, how to upload modified programs to RoArm-M3-S, and how users can perform secondary development on open-source robotic arm programs. The development tool introduced here is Arduino IDE. The following is an introduction to the installation and use of robotic arms in environments such as dependency libraries in Arduino IDE.


What is Arduino IDE

Arduino IDE (Integrated Development Environment), is a development platform based on open-source code, with its own programming language and development environment. Since Arduino IDE provides a wide range of libraries, complex components (such as displays, sensors) and the software platform are easy to use.


Arduino IDE Installation

1. Install Arduino IDE

First, go to Arduino official website to download the installation package of the latest Arduino IDE version. The official IDE supports downloading for different operating systems, you can select according to your operating system. Here we have downloaded one for Windows, if you have installed it, you can skip to the second step. The process is simple and you just need to click Next during the installation

ArduinoIDE1.png

Notice: During the installation process, it will prompt you to install the driver, just click Install.


2. Set Language in Arduino IDE Interface

After the first installation, when you open the Arduino IDE, it will be in English. You can switch to other language in File --> Preferences, or continue using the English interface.

安装Arduino2.png

In the Language field, select the language you want to switch to, and click OK.

550px-安装Arduino3.png

Install Development Environment

The main control module of the driver board on the robotic arm is ESP32, so we need to install the development board corresponding to ESP32 in the Arduino IDE development environment. The steps are as follows:

1. Open the Arduino IDE and click "File" → "Preferences".

250px-M2ESP321.png


2. Add the following link to the attached board manager URL, and then click OK to save the settings.

https://dl.espressif.com/dl/package_esp32_index.json

M2ESP322.png

Note: If you need to add multiple board URLs, you don't need to delete the URLs supported by the ESP32 board. You can directly add other URLs on a new line. By default, the URLs are separated by commas. For example, if you need to add the URL of the ESP8266 development board, add it to another line, which will be displayed as follows:

https://dl.espressif.com/dl/package_esp32_index.json,http://arduino.esp8266.com/stable/package_esp8266com_index.json

M2ESP323.pngM2ESP324.png


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.

M2ESP325.png


You can see that the installed ESP32 development board version from "packages-esp32-hardware-esp32" is version 3.0.7, and the open source program development board ESP32 for the RoArm-M3-S is version 3.0.7.

Esp3.0.7.png

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 in the figure to libraries file folder.

M2 libraries.png

Upload Demo

1. Download RoArm-M3 open source program for lower computer, decompress it, and double-click to open RoArm-M3_example.ino. Note that all files in this directory should be placed within the same folder.

600px-M2上传程序.png


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, the displayed COM port on my computer is COM1; the COM ports may differ on different computers.)

600px-M2上传程序1.png


3. Connect the drive board on the RoArm-M3-S robotic arm to your computer using a USB cable (ensure it's connected to the left USB port). Then, click on "Tools" → "Port" and select the newly appeared COM port (in my case, it's COM29).

M2上传程序2.png


4. In Arduino IDE, click on "Tool" → "DevBoard" → "ESP32" → "ESP32 Dev Module".

600px-M2上传程序3.png


5. Click on "Tool", others as shown below: (For the Partition Scheme, it's recommended to use "Huge APP" and ensure that PSRAM is set to "Enabled.")

M2上传程序4.png


6. Once all settings are configured, click "Upload" to upload the program to the drive board of the robotic arm.

M2上传程序5.png


  • If you encounter problems during the upload process and need to reinstall or change the Arduino IDE version, it's important to uninstall 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 may need to be displayed first). Then, proceed to download and reinstall the Arduino IDE.

RoArm-M3-S Tutorial