i have two computer, two uno board,two hc05 moudle. i connected them by seeing many tutorial in online.Now both hc 05 are paired(2 blinking in a second on both devices).
slave connection(used software serial)
arduino hc 05
rx(d10) tx
tx(d11) rx
5v vcc
gnd gnd
master connection
arduino hc 05
rx(d10) tx
tx(d11) rx
5v vcc
gnd gnd
1)first i connected slave with android and by software terminal app i made arduino led glow and off
the following code is here
#include <SoftwareSerial.h>// import the serial library
SoftwareSerial Genotronex(10, 11); // RX, TX
int ledpin=13; // led on D13 will show blink on / off
char BluetoothData; // the data given from Computer
void setup() {
Genotronex.begin(9600);
Genotronex.println("Bluetooth On please press a or b blink LED ..");
pinMode(ledpin,OUTPUT);
}
void loop() {
// put your main code here, to run repeatedly:
if (Genotronex.available()){
BluetoothData=Genotronex.read();
if(BluetoothData=='a'){ // if number 1 pressed ....
digitalWrite(ledpin,1);
Genotronex.println("LED On D13 ON ! ");
}
if (BluetoothData=='b'){// if number 0 pressed ....
digitalWrite(ledpin,0);
Genotronex.println("LED On D13 Off ! ");
}
}
delay(100);// prepare for next data ...
}
2)Next i tried to do the same form another hc-05(master) which is connected to other arduino(in separate computer).both are paired i am sure.The following code is here for master
#include <SoftwareSerial.h>// import the serial library
SoftwareSerial Genotronex(10, 11); // RX, TX
int BluetoothData;
void setup() {
Genotronex.begin(9600);
}
void loop() {
Serial.write('a');
delay(100);
}
PLEASE HELP ME ,I AM DOING SOME MISTAKE ,BUT I DONT KNOW WHERE IT IS .