9. How to use Processing IDE controls Robotic arm
9. How to use Processing IDE controls Robotic arm
In this course, we will learn how to use Processing software to control Robotic
Arms.
1. Download Processing
Java language and supports many existing Java language architectures. It is not only
much simpler in syntax, but has many intimate and user-friendly designs. Processing
can be used on Windows, MAC OS X, MAC OS 9, Linux and other operating systems.
The latest version is Processing 3. The work done in Processing can be used on the
personal computer side or exported to the Internet in the form of Java Applets.
How to download Processing?
1. Enter this URL with Google Chrome: https://processing.org/ .
2. Click Download Processing, as shown below:
3. The operating system we choose to use here is windows 64-bit, select "Windows 64-bit".
8. Let's write a simple code that implements the following functions "Change the variable
to create a moving line. When the line moves out of the window edge, the variable becomes 0
and the line goes back to the bottom of the screen.
6
9. Click “Run”.
7
10. Running effect is as follow.
2. In the Tools toolbar, find Board and select Arduino Uno, as shown below:
8
Or:
3. In the Tools toolbar, find “Port” and Select the port number of The Adeept
Arm Drive Board, as shown below:
9
4. Click Open in the File drop-down menu:
6. After opening, click to upload the code program to the Adeept Arm
Drive Board. If there is no error warning in the console below, it means that
the Upload is successful.
8. Note that the arm is still connected to the computer with the USB cable.
10
Rotate the arm to the position as shown in the figure below (Manually
remove and adjust without power supply)
11
3. Run the ProcessingArmRobot.pde
Note that the arm is still connected to the computer with the USB cable.
1. Open the Processing software, as shown below:
12
2. Click Open in the File drop-down menu:
Note:
If you run the program with the following code, an error occurs and “COM9”
cannot be found:
printArray(Serial.list());
// Open the port you are using at the rate you want:
You can comment the above port1 and open the following annotated port1 code,
and change COM9 to your corresponding port number:
13
// Or you can use the port number directly:
// COM9 is port number, the port number can be obtained from the Arduino tools
5. The interface of successful running is as below, provides two ways to control the
Robotic Arm: keyboard and mouse.
6. Click "Keyboard" the following interface will appear. Next, press the
14
corresponding button on the keyboard to control the arm.
1. "Q" and "W" control servo5 (Gripper), The “Q” button is to control the
3. "T" and "Y" control servo3 (Elbow). 4."U" and "I" control servo2 (Shoulder).
15
Servo5 Servo4
Servo3
Servo2
Servo1
7. Click "Mouse" and the following interface will appear. click the
corresponding button, the Robotic Arm will make the corresponding movement.
16
3."Elbow+" and "Elbow-" control the servo3,
17