Weird Program Problem

hi you guys ,

does anybody know what happens , i’m programming a self avoiding Rover 5 Robot 4WD.
when i send the program its Channel 4 doesn’t drive anymore ? is there something corrupt in my program?

This is the code ,

#include <Servo.h>
//Declare Servos
Servo leftservo; //Left wheel servo
Servo rightservo; //Right wheel servo
Servo scanservo; //Ping Sensor Servo
const int turntime = 500; //Number of milliseconds to turn when turning
const int pingPin = 12; //Pin that the Ping sensor is attached to.
//const int leftservopin = 9; //Pin number for left servo
//const int rightservopin = 6; // Pin number for right servo
const int scanservopin = 10; // Pin number for scan servo
const int distancelimit = 10; //If something gets this many inched from
#define Motor1 3
#define Motor2 5
#define Motor3 6
#define Motor4 9 //These are PWM Choose A Number between 0 and 255

#define ChBack1 2
#define ChBack2 4
#define ChBack3 7
#define ChBack4 8 //Thes are just I/O LOW/HIGH)
// the robot it stops and looks for where to go.
//Setup function. Runs once when Arduino is turned on or restarted

void setup()
{
//leftservo.attach(leftservopin); //Attach left servo to its pin.
//rightservo.attach(rightservopin); // Attch the right servo
scanservo.attach(scanservopin); // Attach the scan servo
delay(2000); // wait two seconds
}
void loop(){
go(); // if nothing is wrong the go forward using go() function below.
int distance = ping(); // us the ping() function to see if anything is ahead.
if (distance < distancelimit){
stopmotors(); // If something is ahead, stop the motors.
char turndirection = scan(); //Decide which direction to turn.
switch (turndirection){
case ‘l’:
turnleft(turntime);
break;
case ‘r’:
turnright(turntime);
break;
case ‘s’:
// turnleft(turnaroundtime);
break;
}
}
}

int ping(){
long duration, inches, cm;
//Send Pulse
pinMode(pingPin, OUTPUT);
digitalWrite(pingPin, LOW);
delayMicroseconds(2);
digitalWrite(pingPin, HIGH);
delayMicroseconds(5);
digitalWrite(pingPin, LOW);
//Read Echo
pinMode(pingPin, INPUT);
duration = pulseIn(pingPin, HIGH);
// convert the time into a distance
inches = microsecondsToInches(duration);
cm = microsecondsToCentimeters(duration);
Serial.print("Ping: ");
Serial.println(inches);
return round(inches);
}
void go(){
analogWrite(Motor1, 250);
analogWrite(Motor2, 250);
analogWrite(Motor3, 250);
analogWrite(Motor4, 250);

digitalWrite(ChBack1, LOW);
digitalWrite(ChBack2, LOW);
digitalWrite(ChBack3, LOW);
digitalWrite(ChBack4, LOW);
}
void turnleft(int t){
analogWrite(Motor1, 0);
analogWrite(Motor2, 250);
analogWrite(Motor3, 250);
analogWrite(Motor4, 0);

digitalWrite(ChBack1, LOW);
digitalWrite(ChBack2, LOW);
digitalWrite(ChBack3, LOW);
digitalWrite(ChBack4, LOW);
delay(t);
}

void turnright(int t){
analogWrite(Motor1, 250);
analogWrite(Motor2, 0);
analogWrite(Motor3, 0);
analogWrite(Motor4, 250);

digitalWrite(ChBack1, LOW);
digitalWrite(ChBack2, LOW);
digitalWrite(ChBack3, LOW);
digitalWrite(ChBack4, LOW);
delay(t);
}
void forward(int t){
analogWrite(Motor1, 250);
analogWrite(Motor2, 250);
analogWrite(Motor3, 250);
analogWrite(Motor4, 250);

digitalWrite(ChBack1, LOW);
digitalWrite(ChBack2, LOW);
digitalWrite(ChBack3, LOW);
digitalWrite(ChBack4, LOW);
delay(t);
}
void backward(int t){
analogWrite(Motor1, 250);
analogWrite(Motor2, 250);
analogWrite(Motor3, 250);
analogWrite(Motor4, 250);

digitalWrite(ChBack1, HIGH);
digitalWrite(ChBack2, HIGH);
digitalWrite(ChBack3, HIGH);
digitalWrite(ChBack4, HIGH);
delay(t);
}
void stopmotors(){
analogWrite(Motor1, 0);
analogWrite(Motor2, 0);
analogWrite(Motor3, 0);
analogWrite(Motor4, 0);

digitalWrite(ChBack1, LOW);
digitalWrite(ChBack2, LOW);
digitalWrite(ChBack3, LOW);
digitalWrite(ChBack4, LOW);
}

char scan(){
int leftscanval, centerscanval, rightscanval;
char choice;
//Look left
scanservo.write(30);
delay(300);
leftscanval = ping();
//Look right
scanservo.write(150);
delay(1000);
rightscanval = ping();
//center scan servo
scanservo.write(88);

if (leftscanval>rightscanval && leftscanval>centerscanval){
choice = ‘l’;
}
else if (rightscanval>leftscanval && rightscanval>centerscanval){
choice = ‘r’;
}
else{
choice = ‘s’;
}
Serial.print("Choice: ");
Serial.println(choice);
return choice;
}
long microsecondsToInches(long microseconds){
return microseconds / 74 / 2;
}
long microsecondsToCentimeters(long microseconds){
return microseconds / 29 / 2;
}

when i send the program its Channel 4 doesn't drive anymor

What does that mean?

Please use code tags when posting code.

The code looks OK so I suspect a wiring problem. Try swapping #4's wires with the other motor on that side. If the problem moves to the other motor it may be a bad driver.