Error in Serial.read()

I have a UNO board. At present, I’m learning to use Bluetooth module with Arduino. To begin with, I created a simple sketch to turn ON and OFF led by sending commands from my android phone to Arduino through Bluetooth module HC05.

int LED= 13;  
int input;  
  
void setup() 
{  
  Serial.begin(9600);  
  pinMode(LED, OUTPUT);  
  Serial.println(">> START<<");  
}  
  
void loop() 
{  
  if(Serial.available()>0)  
  {  
    Serial.print("available");
    input= Serial.read(); 
    
    if(input=='1')  
    {  
      Serial.println("ON");  
      digitalWrite(LED, HIGH);  
      delay(1000);  
    }  
    else if(input=='0')  
    {  
      Serial.println("OFF");  
      digitalWrite(LED, LOW);  
      delay(1000);  
    }  
    else  
    {  
      Serial.println("NO INPUT");  
      Serial.println(input);  
      delay(1000);
    }  
  }  
    
}

connections are:

VCC to 5V
GND to GND
TX to RX [0th pin]
RX to TX [1st pin]

The problem is when I press value ‘1’ or ‘0’ from android phone, I get incorrect values in the serial monitor.
I have attached the photocopy of serial monitor output.

serial monitor output.jpg

So you are talking to the bluetooth module and the Serial monitor with the same port? Connecting 2 devices to the same port will not work. Consider using a software serial port for the bluetooth (several libraries available) and hardware serial (pins 0 and 1) for messages to serial monitor.

softwareSerial

groundfungus:
So you are talking to the bluetooth module and the Serial monitor with the same port? Connecting 2 devices to the same port will not work. Consider using a software serial port for the bluetooth (several libraries available) and hardware serial (pins 0 and 1) for messages to serial monitor.

softwareSerial

Yes. and what that delay(1000) is doing there ??

-Malhar