Wednesday 4 February 2015

Control your Robot using your Android mobile using a Bluetooth

Controlling a Arduino with an android is very easy.Since Arduino communicates with other device using a serial interface we need to sort out how we are going to connect our Android to our Arduino.

Materials Used

A Android Mobile
Arduino
Bluetooth Module
Testing LED or any other Actuators
Few connecting wires


Connections


Sketch
//The following sketch blinks an LED when you send a message from your mobile
//Any other control other than a LED can also be made by editing the required block of LED in the sketch

void setup()
{
  pinMode(13,OUTPUT);
  Serial.begin(9600); // very important since BTmodule is going to communicate with arduino with serial communication
}
void loop()
{
  if(Serial.available()>0)
  {
    int input=Serial.read();
    if(input=='a')
      digitalWrite(13,HIGH);
      delay(3000); // to notice the blink of LED
    else
      digitalWrite(13,LOW);
  }
}


Configure your Android

1) Go to Playstore
2)Download the existing app SENA Bterm Bluetooth Terminal
3)connect the app with your Arduino BT module
4)Now its time to control
5) Inside the APP go to Terminal and send the character 'a' and you can see a LED blink on the Arduino
6)DONE make your own robot with it..!!