0% found this document useful (0 votes)
7 views

9. How to use Processing IDE controls Robotic arm

Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
7 views

9. How to use Processing IDE controls Robotic arm

Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 17

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

Processing is a revolutionary and forward-looking new computer language. Its


concept is to introduce programming languages in the environment of electronic art
and introduce the concept of electronic art to programmers. It is an extension of the

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".

4. When finish downloading, you will get a compressed file "processing-3.5.4-


windows64.zip".
5. After extracting this file, you can get the following file, just click to run processing, it can
be run directly without installation.

6. The interface is as follows after the Processing runs.


7. the library file ControlP5 needs to be added.
Then search ControlP5 (If you do not find it in the list, please close this window,
reopen it, and search again. ) Finally click Install.

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. Upload the AdeeptArmRobot.ino


The AdeeptArmRobot.ino is a program to control the Robotic Arm servo.
1. Open the Arduino IDE, as shown below:

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:

5. Find the Package of Documentation (Reference: Chapter: "_4 build


Arduino development environment", step 2 under subsection (3) under

subsection 5) that we provide to the user. Open the directory in sequence:


“Code” -> “9. Processing” -> “AdeeptArmRobot”. Then select the code file
"AdeeptArmRobot.ino" and click the "Open" button.

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.

7. After downloading, close AdeeptArmRobot.ino

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:

3. Find the folder AdeeptRoboticArmforArduinoV3_5 that we provide to the user.


Open the directory in sequence: “Code” -> “9. Processing” -> “ProcessingArmRobot”.
Then select the code file "ProcessingArmRobot.pde" and click the "open" button.

4. After opening, click to run the code, as shown below:

Note:

If you run the program with the following code, an error occurs and “COM9”
cannot be found:

// List all the available serial ports:

printArray(Serial.list());

// Open the port you are using at the rate you want:

port1 = new Serial(this, Serial.list()[1], 9600);

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

port1 = new Serial(this,"COM9", 9600);

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

gripper to open; the “W” button is to control the gripper to close.


2. "E" and "R" control servo4 (Rotate),"E" button is to turn to the left,"R"

button is to turn to the right.

3. "T" and "Y" control servo3 (Elbow). 4."U" and "I" control servo2 (Shoulder).

5."O" and "P" control servo1 (Base).

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.

1."Gripper+" and "Gripper-" control the servo5,

2."Rotate+" and "Rotate-" control the servo4,

16
3."Elbow+" and "Elbow-" control the servo3,

4."Shoulder+" and "Shoulder-" control the servo2,

5." Base+” and “Base-” control the servo1.

17

You might also like