how to program bluetooth in arduino uno with arduino sensor shield

char t;

void setup() {
pinMode(11,OUTPUT); //left motors forward
pinMode(10,OUTPUT); //left motors reverse
pinMode(8,OUTPUT); //right motors forward
pinMode(9,OUTPUT); //right motors reverse

Serial.begin(9600);

}

void loop() {
if(Serial.available()){
t = Serial.read();
Serial.println(t);
}

if(t == 'F'){ //move forward(all motors rotate in forward direction)
digitalWrite(11,HIGH);
digitalWrite(8,HIGH);
}

else if(t == 'B'){ //move reverse (all motors rotate in reverse direction)
digitalWrite(10,HIGH);
digitalWrite(9,HIGH);
}

else if(t == 'L'){ //turn right (left side motors rotate in forward direction, right side motors doesn't rotate)
digitalWrite(8,HIGH);
}

else if(t == 'R'){ //turn left (right side motors rotate in forward direction, left side motors doesn't rotate)
digitalWrite(11,HIGH);
}

else if(t == 'S'){ //STOP (all motors stop)
digitalWrite(11,LOW);
digitalWrite(10,LOW);
digitalWrite(8,LOW);
digitalWrite(9,LOW);
}
delay(100);
}

Hi,
Welcome to the forum.

Please read the post at the start of any forum , entitled "How to use this Forum".
OR
http://forum.arduino.cc/index.php/topic,148850.0.html.
Then look down to item #7 about how to post your code.
It will be formatted in a scrolling window that makes it easier to read.

Can you please post a copy of your circuit, in CAD or a picture of a hand drawn circuit in jpg, png?

What are you asking?
Does your code work?

Thanks.. Tom.. :slight_smile:

TomGeorge:
What are you asking?

And also check the heading of your post - word by word. Your code has nothing to do with programming Bluetooth.