arduino uno

hey i have this sensor that detects motion and i was going to use as for a project but im kinda stuck in how i should program it?
i got this toy tank that its going to detect motion with the motion detector sensor and i want it to sweep acroos the every 90 degrees aND stop for about 10 seconds and move again, but once it detects i want it to stop and use a ping sensor to get the sensor to stop at a certain distance to shoot its bbs.
so far i have wote the motion detector to test it out but my problem is how should i be able to use the motion detector sensor in this application for c code, any help would be appreciated.
im going to put an example of my code to show how its writen!
by the way im using a xband motion detector
my program:

void setup() {
Serial.begin(9600);
Serial.println(“Pulse test”);

pinMode(13, OUTPUT);
attachInterrupt(1, intHandler, CHANGE);
}

volatile int pulseCount = 0;

void intHandler() {
pulseCount++;
}

void loop() {
if (pulseCount > 2) {
digitalWrite(13, HIGH);
if (pulseCount > 3) {
Serial.print("MOTION! ");
Serial.println(pulseCount);
}
digitalWrite(13, LOW);
}
if (pulseCount > 0 && pulseCount <= 3) {
Serial.println(pulseCount);
}
pulseCount = 0;
delay(250);
}

hey i have this xband motion detector sensor and i want to use a servo and a ping sensor to be activated when the motion detector detects any motion so far i got this for the motion detector but im kinda stuck to implement the servo and the ping to be activvated, so any help would be appreciated or advice, or even mentors who can guide me to this project im building!
thanks in advance!
program code:

void setup() {
Serial.begin(9600);
Serial.println(“Pulse test”);

pinMode(13, OUTPUT);
attachInterrupt(1, intHandler, CHANGE);
}

volatile int pulseCount = 0;

void intHandler() {
pulseCount++;
}

void loop() {
if (pulseCount > 2) {
digitalWrite(13, HIGH);
if (pulseCount > 3) {
Serial.print("MOTION! ");
Serial.println(pulseCount);
}
digitalWrite(13, LOW);
}
if (pulseCount > 0 && pulseCount <= 3) {
Serial.println(pulseCount);
}
pulseCount = 0;
delay(250);
}

Cross-posting only serves to make people cross. Don't do it.

There is plenty of example code to drive Ping sensors and servos. You've just got to look for it. Try the Playground.

Here is some useful background reading

hey i have this sensor that detects motion

...

hey i have this xband motion detector sensor

Are these the same sensor?