Got Robot arm arduino Code !! but its not working need help with this code plz +++++

here is the Code !!

​got  robot arm code for arduino but its not working can  tell me how to fix it ? here is the code

// Language: Processing
// RobotArmControl.pde

// by Sam Thongrong Feb 26, 2012

// load the serial library for Processing
import processing.serial.*;
// instance of the serial class
Serial port;

// control commands array:
// GripOut, GripIn, WristUp, WristDown, ElbowUp, ElbowDown,
// ShoulderUp, shoulderDown, BaseCW, BaseCCW, LightOn, LightOff, Stop

int[] controls = new int[] {
0x47, 0x67, 0x57, 0x77, 0x45, 0x65,
0x53, 0x73, 0x42, 0x62, 0x4c, 0x6c, 0x58 };

// Image button.
// Loading images and using them to create a button.
ImageButtons GripIn;
ImageButtons GripOut;
ImageButtons WristUp;
ImageButtons WristDown;
ImageButtons ElbowUp;
ImageButtons ElbowDown;
ImageButtons ShoulderUp;
ImageButtons ShoulderDown;
ImageButtons BaseCW;
ImageButtons BaseCCW;
ImageButtons LightOn;
ImageButtons LightOff;

ImageButtons Pause;

// background
PImage bg;

// set the font
PFont myFont;

void controlGUI()
{
bg = loadImage("background.jpg");
background(bg);

int buttonSize = 44;

PImage selected = loadImage("controlSel.png");

//Grip In
PImage gripInImage = loadImage("controlIn.png");
PImage gripInOver = loadImage("controlInOver.png");
GripIn = new ImageButtons(30, 83, buttonSize, buttonSize,
gripInImage, gripInOver, selected);

//Grip Out
PImage gripOutImage = loadImage("controlOut.png");
PImage gripOutOver = loadImage("controlOutOver.png");
GripOut = new ImageButtons(78, 83, buttonSize, buttonSize,
gripOutImage, gripOutOver, selected);

//Wrist Up
PImage wristUpImage = loadImage("controlUp.png");
PImage wristUpOver = loadImage("controlUpOver.png");
WristUp = new ImageButtons(150, 36, buttonSize, buttonSize,
wristUpImage, wristUpOver, selected);

//Wrist Down
PImage wristDownImage = loadImage("controlDown.png");
PImage wristDownOver = loadImage("controlDownOver.png");
WristDown = new ImageButtons(198, 36, buttonSize, buttonSize,
wristDownImage, wristDownOver, selected);

//Elbow Up
PImage elbowUpImage = loadImage("controlUp.png");
PImage elbowUpOver = loadImage("controlUpOver.png");
ElbowUp = new ImageButtons(258, 83, buttonSize, buttonSize,
elbowUpImage, elbowUpOver, selected);

//Elbow Down
PImage elbowDownImage = loadImage("controlDown.png");
PImage elbowDownOver = loadImage("controlDownOver.png");
ElbowDown = new ImageButtons(306, 83, buttonSize, buttonSize,
elbowDownImage, elbowDownOver, selected);

//Shoulder Up
PImage shoulderUpImage = loadImage("controlUp.png");
PImage shoulderUpOver = loadImage("controlUpOver.png");
ShoulderUp = new ImageButtons(208, 160, buttonSize, buttonSize,
shoulderUpImage, shoulderUpOver, selected);

//Shoulder Down
PImage shoulderDownImage = loadImage("controlDown.png");
PImage shoulderDownOver = loadImage("controlDownOver.png");
ShoulderDown = new ImageButtons(256, 160, buttonSize, buttonSize,
shoulderDownImage, shoulderDownOver, selected);

//Base CW
PImage baseCWImage = loadImage("controlCW.png");
PImage baseCWOver = loadImage("controlCWOver.png");
BaseCW = new ImageButtons(130, 234, buttonSize, buttonSize,
baseCWImage, baseCWOver, selected);

//Base CCW
PImage baseCCWImage = loadImage("controlCCW.png");
PImage baseCCWOver = loadImage("controlCCWOver.png");
BaseCCW = new ImageButtons(178, 234, buttonSize, buttonSize,
baseCCWImage, baseCCWOver, selected);
//Light On
PImage lightOnImage = loadImage("LightOn.png");
PImage lightOnOver = loadImage("LightOnOver.png");
LightOn = new ImageButtons(30, 184, buttonSize, buttonSize,
lightOnImage, lightOnOver, selected);

//Light Off
PImage lightOffImage = loadImage("LightOff.png");
PImage lightOffOver = loadImage("LightOffOver.png");
LightOff = new ImageButtons(78, 184, buttonSize, buttonSize,
lightOffImage, lightOffOver, selected);

}

void setup() {
// List all the available serial ports in the output pane.
// You will need to choose the port that the Arduino board is
// connected to from this list. The first port in the list is
// port #0 and the third port in the list is port #2.
//println(Serial.list());
// Open the port that the Arduino board is connected to
// (in this case #0)
// Make sure to open the port at the same speed Arduino is
// using (112500bps)
//port = new Serial(this, Serial.list()[1], 112500);

// On Window PC, use "Outgoing" of the bluetooth device
// This one for XBee
port = new Serial(this, "COM30", 115200);

// screen size of the program
//size(145, 455);
size(400, 300);
smooth();

// test ellipse
ellipseMode(RADIUS);
textFont(createFont("Verdana", 14));

controlGUI();

}

void updateDisplay() {

GripIn.update();
GripIn.display();
GripOut.update();
GripOut.display();

WristUp.update();
WristUp.display();
WristDown.update();
WristDown.display();

ElbowUp.update();
ElbowUp.display();
ElbowDown.update();
ElbowDown.display();

ShoulderUp.update();
ShoulderUp.display();
ShoulderDown.update();
ShoulderDown.display();

BaseCW.update();
BaseCW.display();
BaseCCW.update();
BaseCCW.display();

LightOn.update();
LightOn.display();
LightOff.update();
LightOff.display();
}

//Send Commands
void sendCommands() {

// Grip
if(GripIn.pressed) {
port.write(controls[0]);
//println("Grip In: " + (char)controls[0]);
}
if(GripOut.pressed) {
port.write(controls[1]);
//println("Grip Out: " + (char)controls[1]);
}
if(mouseX > 30 && mouseX < 129 &&
mouseY > 51 && mouseY < 79) {
port.write(controls[12]);
//println("Grip Stop! " + (char)controls[12]);
}

// Wrist
if(WristUp.pressed) {
port.write(controls[2]);
//println("Wrist Up: " + (char)controls[2]);
}
if(WristDown.pressed) {
port.write(controls[3]);
//println("Wrist Down: " + (char)controls[3]);
}
if(mouseX > 148 && mouseX < 248 &&
mouseY > 5 && mouseY < 33) {
port.write(controls[12]);
//println("Wrist Stop! " + (char)controls[12]);
}

// Elbow
if(ElbowUp.pressed) {
port.write(controls[4]);
//println("Elbow Up: " + (char)controls[4]);
}
if(ElbowDown.pressed) {
port.write(controls[5]);
//println("Elbow Down: " + (char)controls[5]);
}
if(mouseX > 258 && mouseX < 358 &&
mouseY > 51 && mouseY < 79) {
port.write(controls[12]);
//println("Elbow Stop! " + (char)controls[12]);
}

//Shoulder
if(ShoulderUp.pressed) {
port.write(controls[6]);
//println("Shoulder Up: " + (char)controls[6]);
}
if(ShoulderDown.pressed) {
port.write(controls[7]);
//println("Shoulder Down: " + (char)controls[7]);
}
if(mouseX > 208 && mouseX < 308 &&
mouseY > 130 && mouseY < 158) {
port.write(controls[12]);
//println("Shoulder Stop! " + (char)controls[12]);
}

// Base
if(BaseCW.pressed) {
port.write(controls[8]);
//println("Base Rotate CW: " + (char)controls[8]);
}
if(BaseCCW.pressed) {
port.write(controls[9]);
//println("Base Rotate CCW: " + (char)controls[9]);
}
if(mouseX > 130 && mouseX < 230 &&
mouseY > 202 && mouseY < 230) {
port.write(controls[12]);
//println("Base Stop! " + (char)controls[12]);
}

// Light
if(LightOn.pressed) {
port.write(controls[10]);
//println("Light On: " + (char)controls[10]);
}
if(LightOff.pressed) {
port.write(controls[11]);
//println("Light Off: " + (char)controls[11]);
}
}

void draw()
{
updateDisplay();

sendCommands();
}

// Button & ImageButtons Classes
class Button
{
int x, y;
int w, h;
color basecolor, highlightcolor;
color currentcolor;
boolean over = false;
boolean pressed = false;

void pressed() {
if(over && mousePressed) {
pressed = true;
} else {
pressed = false;
}
}

boolean overRect(int x, int y, int width, int height) {
if (mouseX >= x && mouseX <= x+width &&
mouseY >= y && mouseY <= y+height) {
return true;
} else {
return false;
}
}
}

class ImageButtons extends Button
{
PImage base;
PImage roll;
PImage down;
PImage currentimage;

ImageButtons(int ix, int iy, int iw, int ih,
PImage ibase, PImage iroll, PImage idown)
{
x = ix;
y = iy;
w = iw;
h = ih;
base = ibase;
roll = iroll;
down = idown;
currentimage = base;
}

void update()
{
over();
pressed();
if(pressed) {
currentimage = down;
} else if (over){
currentimage = roll;
} else {
currentimage = base;
}
}

void over()
{
if( overRect(x, y, w, h) ) {
over = true;
} else {
over = false;
}
}

void display()
{
image(currentimage, x, y);
}
}

// Processing End

Do you want ud to build a robotic arm, upload the code and try it or is it possible by any chance to get the missing details?
"Does not work" does not help at all if you make a request for help - my best answer for this would be: Turn the power on ;)
The code is a few years old, do you have the right libraries, did you check if the creator published and updates?
Do you understand the code and have all the images in the right place and resolution?
Do you have all the right libraries included?

maybe this?........ https://www.instructables.com/id/Make-Wired-Robotic-Arm-Edge-to-Wireless-with-DIY/