title: Arduino led on and off program using hc05 bluetooth module. Bluetooth doesn't recieve what I send using bluetooth terminal app
body: <p>I have tried to connect my arduino with hc-05, and run a simple 'LED on and off' program. When I disconnected the rx and tx pins and tried sending the commands using serial monitor in arduino, and it worked perfectly alright. But when I connected the rx and tx pins of hc-05 bluetooth module, and used the Bluetooth terminal app from playstore to send and recieve commands, whatever I send doesn't get recieved the same, instead I get weird characters on my serial monitor. Someone please help me solve this. I have included the arduino code and the screen shots of the serial monitor and the app.</p>
  
  <pre><code>char junk;
  String inputString="";
  
  void setup()
  {
  Serial.begin(9600);
  pinMode(13, OUTPUT);
  }
  
  void loop()
  {
    if(Serial.available()){
    while(Serial.available())
      {
        char inChar = (char)Serial.read();
        inputString += inChar;
      }
      Serial.println(inputString);
      while (Serial.available() &gt; 0)  
      { junk = Serial.read() ; }
      if(inputString == "a"){ 
        digitalWrite(13, HIGH);  
      }else if(inputString == "b"){  
        digitalWrite(13, LOW);
      }
      inputString = "";
    }
  }
  </code></pre>
  
  <p><a href="http://i.stack.imgur.com/ZiZmS.png" rel="nofollow">SERIAL MONITOR ARDUINO</a>
  <a href="http://i.stack.imgur.com/Ciphu.png" rel="nofollow">Bluetooth Terminal</a></p>