Bluetooth bağlantısı

Bluetooth bağlantısını gerçekleştirdim ama bazen bağlantı olduğu halde yaptığım devrede sorun çıkıyor. Motor çalıştırıyorum röle ile bazen değer yolladığımda hiç bi tepki vermiyor. Kodlarım aşağıdaki gibidir. Sorunum ne henüz anlayamadım. Kullandığım bluetooth ise HC-06 #include <softwareserial.h>
SoftwareSerial myBluetooth(0, 1); // RX, TX
int deger;

int motor1 = 7;
int motor2 = 9;

void setup() {
pinMode(motor1,OUTPUT);
pinMode(motor2,OUTPUT);
myBluetooth.begin(9600);
myBluetooth.println(“Motor Test.”);
delay(1000);
digitalWrite(motor1,LOW);
digitalWrite(motor2,LOW);
}

void loop() {
if (myBluetooth.available())
{
deger=myBluetooth.read();
if(deger==‘w’){
myBluetooth.println(“ileri.”);
digitalWrite(motor1,HIGH);
digitalWrite(motor2,HIGH);
}
if (deger==‘s’){
myBluetooth.println(“dur”);
digitalWrite(motor1,LOW);
digitalWrite(motor2,LOW);
}

if (deger=='a'){
  myBluetooth.println("sol");
  digitalWrite(motor1,HIGH);
  digitalWrite(motor2,LOW);
}

if (deger=='d'){
  myBluetooth.println("sag");
  digitalWrite(motor1,LOW);
  digitalWrite(motor2,HIGH);
}
delay(100);  

}
delay(500);
}

</softwareserial.h>