Hey guys,
in my previous post I explained that my HC-06 does not recieve data from my bluetooth terminal (from android phone).
I was told to get the HC-05 module.
So I ordered one.
I use a Arduino Nano
Pinconnection as following:
Bluetooth RX -> To voltage 1.1k ohm and 2k ohm resistor and then to TX on my arduino nano
Bluetooth TX -> To RX on nano
Bluetooth VCC -> to Vout
Bluetooth GND -> GND
I used this code to debug:
int tx=0;
int rx=1;
char junk;
String inputString="";
void setup(){
Serial.begin(9600);
pinMode(13,OUTPUT);
pinMode(tx,OUTPUT);
pinMode(rx,INPUT);
}
void loop(){
if(Serial.available()){
while(Serial.available()){
char inChar = (char)Serial.read();
inputString+=inChar;
}
Serial.println(inputString);
while(Serial.available()>0){
junk=Serial.read();
}
if (inputString == "a"){
digitalWrite(13,HIGH);
}
else if(inputString == "b"){
digitalWrite(13,HIGH);
}
inputString = "";
}
}
If I use the Arduino Terminal and write A or B this works correctly
If I use the bluetooth terminal (tried different apps) on the android and write A or B nothing happens..
If I write A or B on the arduino Terminal it does echo this on the bluetooth terminal.
How can I get this working so that I can write commands in my bluetooth terminal?
All help is appreciated
Terick
Edit: this is how I connected the Bluetooth RX to Arduino nano TX:
I did wire them to tx and rx on the arduino, not D3 and D2 like in the picture