motor wont work with bluetooth control

i can't get my motor to run with this code everything was fine but after i put the Bluetooth code on and my motor won't work

#define HC01 Serial3
int a1=43;
int a2=52;
int sp1=8;
int b1=41;
int b2=53;
int sp2=9;
int i=0;

void setup()
{
delay(1000);
Serial.begin(9600);
HC01.begin(9600);

Serial.write("\n Start \n");

pinMode(31,INPUT);
pinMode(a1,OUTPUT);
pinMode(a2,OUTPUT);
pinMode(sp1,OUTPUT);
pinMode(b1,OUTPUT);
pinMode(b2,OUTPUT);
pinMode(sp2,OUTPUT);

}

void loop()
{
if(HC01.available())
{
char data = HC01.read();
Serial.write(data);
HC01.write(data);

if (i==1){

digitalWrite(a1,HIGH);
digitalWrite(a2,HIGH);
analogWrite(sp1,200);
digitalWrite(b1,LOW);
digitalWrite(b2,LOW);
analogWrite(sp2,200);
delay(300);
}
if (i==2) {

digitalWrite(a1,LOW);
digitalWrite(a2,LOW);
digitalWrite(sp2,200);
digitalWrite(sp1,200);
digitalWrite(b1,HIGH);
digitalWrite(b2,HIGH);

}

}
}

What Arduino are you using?

How is the motor connected? - post a wiring diagram

What are your Serial.print() statements showing?

Please modify your post and use the code button </> so your code looks like this and is easy to copy to a text editor. See How to use the Forum

...R

It would help if the code had a few comments but I'm guessing the a1, a2, sp1 etc have something to do with some unnamed motor driver perhaps. So it looks like your motors are intended to run if i==1 or i==2 but i is initialised to 0 and never seems to be changed after that. So when were you expecting the motors to run?

Steve