Hi, I am trying to comunicate an arduino UNO with android using the famous HC-06 bluetooth module.
Sending things (char,Strings...) from android using a bluetooth terminal app works fine, the problem is that when I use Serial.println to send things to android from arduino it works but I always get what I sent 3 times repeated. I don´t know why, the bluetooth module is with stock configuration, I don't used any AT commands for nothing.
This is the code in arduino:
char INBYTE;
int LED = 13; // LED on pin 13
void setup() {
Serial.begin(9600);
pinMode(LED, OUTPUT);
}
void loop() {
Serial.println("bla bla bla");
while (!Serial.available()); // stay here so long as COM port is empty
INBYTE = Serial.read(); // read next available byte
if( INBYTE == '0' ) digitalWrite(LED, LOW); // if it's a 0 (zero) tun LED off
if( INBYTE == '1' ) digitalWrite(LED, HIGH); // if it's a 1 (one) turn LED on
delay(50);
}
On android side I tryed several bluetooth terminal app's and all does the same, I always get:
bla bla bla
bla bla bla
bla bla bla
Thanks!