Need help with coding

ok here is the code
I need help combining them. I want the sound sensor to pick up signal that activates my motor.
Code for the sound sensor:
<

const int soundPin = A0; //sound sensor attach to A0
int threshold = 600; //Set minimum threshold for LED lit
void setup()
{
  pinMode(ledPin, OUTPUT); //set pin13 as OUTPUT
  Serial.begin(9600); //initialize serial
}
void loop()
{
  int value = analogRead(soundPin);//read the value of A0
  Serial.println(value);//print the value
  if (value > threshold) //if the value is greater than 600
  {
    digitalWrite(ledPin, HIGH); //turn on the led
    delay(200);//delay 200ms
  }
  else
  {
    digitalWrite(ledPin, LOW); //turn off the led
  }
  delay(1000);
}````Preformatted text`





motor sensor:
<
// C++ code
//
#include <Servo.h>

int i = 0;

int postision = 0;

int j = 0;

Servo servo_0;

Servo servo_9;

void setup()
{
  servo_0.attach(0, 500, 2500);

  servo_9.attach(9, 500, 2500);

}

void loop()
{
  postision = 0;
  for (i = 1; i <= 90; i += 1) {
    servo_0.write(postision);
    delay(50); // Wait for 50 millisecond(s)
  }
  for (postision = 90; postision >= 1; postision -= 1) {
    servo_9.write(postision);
  }
}```

Topics relating to the same code merged

@paxid do not cross post what is actually the same question in different topics otherwise you run the risk of a timeout from the forum

as a program can do more complex things than two combined lego-bricks.
Programming is more complex than lego-bricks.

The first combining you can do is combine reading first, with second, third, fourth,.... page of a programming tutorial like this:

Arduino Programming Course
best regards Stefan