This is my first post. I hope that I am posting in the right section of the forum. Otherwise, could an admin move this topic to the appropriate section please?
Board : Arduino Pro Mini 3.3V 8MHz
Arduino IDE : 1.6.12 Arduino is powered by a FTDI Board and USB Mini-B cable from the computer USB port in the following order :
Arduino FTDI
BLK GND
GND CTS
VCC VCC
RXi TX
TXo RX
DTR DTR
Also, I have connected a HC-06 bluetooth module in the following order :
Arduino HC-06
GND GND
VCC VCC
D10 TXD
D11 RXD
The Serial Monitor is open on COM4, Newline, 9600 baud.
The code that I'm trying to run is :
#include <SoftwareSerial.h>
SoftwareSerial BT(10, 11);
void setup()
{
pinMode(13, OUTPUT);
BT.begin(9600);
// Send test message to other device
BT.println("Hello from BTSerial");
Serial.begin(9600);
Serial.println("Hello from Serial");
}
char a; // stores incoming character from other device
void loop()
{
if (BT.available())
// if text arrived in from BT serial...
{
a=(BT.read());
if (a=='1')
{
digitalWrite(13, HIGH);
BT.println("LED on");
}
if (a=='2')
{
digitalWrite(13, LOW);
BT.println("LED off");
}
if (a=='?')
{
BT.println("Send '1' to turn LED on");
BT.println("Send '2' to turn LED on");
}
Serial.println(a);
}
}
I am trying to communicate with the HC-06 from an Android phone. I am posting in this section of the forum because when I send a message from the phone to Arduino the following is printed in the Serial Monitor :
à„…€ƒ¦¤„„‡…§¤¦„‡Å„EóAãbBãbHãb
When I am trying to send a message from Arduino to the phone, nothing is received on the phone.
Could someone please explain why I get garbage output on the Serial Monitor even though the baud rate is the same in the code as it is in Serial Monitor window? Is there a problem with the Arduino IDE?
Edit 12.11.2016
This is what I get when I open the Serial Monitor in the Arduino IDE with this code : Newline, Baud rate 9600
‚Ƈ¥Ç$¤†Fó
If I change the Serial Monitor properties to Newline, Baud rate 19200 this is what I receive :
Hello from Serial
On the Android phone application I do not get anything printed.
Also, please note that this question is also addressed on the Arduino forum at the following link : http://forum.arduino.cc/index.php?topic=434623.0 I will try and answer in both places as I am not sure that everybody has an account on the forum