Robot arm detects the sensors

I created a code for control the robotic arm, which on the basis of data from the photosensor moves and picks up a small object. Then it moves to another location, where is indicated by another photosensor, the arm stop the movement and puts the object down. The problem is in the code, that it don´t find the right solution for motion because I can´t write multiple if statements like a below. Can anyone help, how to create the conditions for the indication of photosensors?

int enable_motor[] = {8, 7, 10, 9, 12};   
int input1_motor[] = {6, 4, A4, A7, A0};  
int input2_motor[] = {3, 5, A5, A6, A1};  

int LED_diode = 11;  

int sensor_right = A8;
int sensor_left = A12;
int sensor_bottom = A9;
int value_right = 0;
int value_right2 = 0;
int value_left = 0;

void setup() {
 
  Serial.begin(9600); 
  
  for (int i = 0; i < 5; i++) {
    
    pinMode(enable_motor[i], OUTPUT);
    pinMode(input1_motor[i], OUTPUT);
    pinMode(input2_motor[i], OUTPUT);
  } 
    pinMode(LED_diode, OUTPUT); 
}
  
void wrist_open() {      
  digitalWrite(enable_motor[0], HIGH);
  digitalWrite(input1_motor[0], LOW);  
  digitalWrite(input2_motor[0], HIGH);  
}

void wrist_close() {    
  digitalWrite(enable_motor[0], HIGH);
  digitalWrite(input1_motor[0], HIGH);
  digitalWrite(input2_motor[0], LOW);
}

void wrist_stop() {      
  digitalWrite(enable_motor[0], LOW);
  digitalWrite(input1_motor[0], LOW);
  digitalWrite(input2_motor[0], LOW);
}

void hand_up() {        
  digitalWrite(enable_motor[1], HIGH);
  digitalWrite(input1_motor[1], LOW);
  digitalWrite(input2_motor[1], HIGH);  
}

void hand_down() {
  digitalWrite(enable_motor[1], HIGH);     
  digitalWrite(input1_motor[1], HIGH); 
  digitalWrite(input2_motor[1], LOW);
}

void hand_stop() {
  digitalWrite(enable_motor[1], LOW);     
  digitalWrite(input1_motor[1], LOW);
  digitalWrite(input2_motor[1], LOW);
}

void elbow_up() {   
  digitalWrite(enable_motor[2], HIGH);    
  digitalWrite(input1_motor[2], LOW);  
  digitalWrite(input2_motor[2], HIGH);   
}

void elbow_down() {
  digitalWrite(enable_motor[2], HIGH);     
  digitalWrite(input1_motor[2], HIGH);   
  digitalWrite(input2_motor[2], LOW);
}

void elbow_stop() {
  digitalWrite(enable_motor[2], LOW);      
  digitalWrite(input1_motor[2], LOW);   
  digitalWrite(input2_motor[2], LOW);
}

void shoulder_up() {
  digitalWrite(enable_motor[3], HIGH);    
  digitalWrite(input1_motor[3], HIGH);  
  digitalWrite(input2_motor[3], LOW);   
}

void shoulder_down() {
  digitalWrite(enable_motor[3], HIGH);    
  digitalWrite(input1_motor[3], LOW); 
  digitalWrite(input2_motor[3], HIGH);  
}

void shoulder_stop() {      
  digitalWrite(enable_motor[3], LOW);
  digitalWrite(input1_motor[3], LOW);
  digitalWrite(input2_motor[3], LOW);   
}

void base_left() {
  digitalWrite(enable_motor[4], HIGH);    
  digitalWrite(input1_motor[4], LOW);
  digitalWrite(input2_motor[4], HIGH);  
}

void base_right() {
  digitalWrite(enable_motor[4], HIGH);    
  digitalWrite(input1_motor[4], HIGH);  
  digitalWrite(input2_motor[4], LOW);
}

void base_stop() {      
  digitalWrite(enable_motor[4], LOW);      
  digitalWrite(input1_motor[4], LOW);  
  digitalWrite(input2_motor[4], LOW);
}

void light_on() {
  digitalWrite(LED_diode, HIGH);      
}

void light_off() {
  digitalWrite(LED_diode, LOW);      
}

void turnOff() {
  wrist_stop();
  hand_stop();
  elbow_stop();
  shoulder_stop();
  base_stop();
}
  
}

void loop() {    
  value_right = analogRead(sensor_right);
  value_right2 = analogRead(sensor_bottom);
  
  light_on();
  delay(1);
  base_right();
 
  if (value_right > 850);
    base_stop();
    delay(1);
    shoulder_down();
    delay(2000);
    shoulder_stop();
    delay(1);       
    shoulder_up();

    if (value_right2 > 50) {              - ?? Here the if statement isn't not function or not important for the part of the code 
       shoulder_stop();
       delay(1);
       base_left();   
    }
 
}
if (value_right > 850);

Fix that, repost then we'll talk

The value is indicated by IC sensor. When the robot arm targets photosensor, then it moves down and picks up a small object. Then it moves up until targeting another sensor, that it turns right and puts down on the basis of the data of another sensor.

Thank you for help.

So, it's fixed?

if (value_right > 850);

It is functional, but arm isn't respond after another conditions, for example.

if (value_right > 850) {
   ......
   if (value_right2 > 50) {
          // here is no response for motion of arm 
   }


}

Is the second value expected to have changed in the time between the two tests? If so, you need to read it again.

Here are two different sensors with different values. These sensors are connected on one the breadboard.

Serial debug prints would help you visualise what is going on. I can't see your setup, or your problem.

Which setup can you to see it? I sent code above. On serial print is showing only values of sensors.

Which setup can you to see it?

I don't understand the question.

I sent code above. On serial print is showing only values of sensors.

There is no serial output in the code above.

Can you ask the question again, please?

AWOL:

Which setup can you to see it?

I don't understand the question.

You wanted to see my setup, but I don't know about the setup you thought?

I sent code above. On serial print is showing only values of sensors.

There is no serial output in the code above.

Can you ask the question again, please?

I already wrote above.

OK, good luck.

I can't see your hardware, or your serial debug output.

I can't see your code.

I can't help you.

Mr. Kozlovsky1 has asked some questions about controlling his robot arm last week. He uploaded his Fritzing! sketch there for us to check it. The most recent sketch also has two LDRs drawn, connected to Analog in 0 and 1. I guess that is what he is talking about.

I sure hope mr. Kozlovsky1 will mention this site as a source in his paper by the way.