Hello everyone.
My project needs to send data between Master-Slave using Bluetooth modules hc05, hc06, I configured the hc05 to be Master and did the following:
- changed the baud to 9600 for hc05 ( hc06 is d 9600 by default )
- set hc05 as master
- automatically connect hc05 to hc06 Bluetooth module using hc06 address
everything is fine but some of the data that I sent from master to slave are false and some of them are correct!!
ex: sending (L) from the master the slave received (A);
I tried to add a delay between each character I send but nothing changed!
bluetooth modules - Arduino Uno
Tx - Rx pin(0)
Rx - Tx pin(1)
gnd - gnd
vcc - 3v
any help will be appreciated.
Serial.write('L');
delay(600);
Serial.write('L');
delay(600);
Serial.write('E');
SOLVED since I am newbie to the Arduino and after searching for Serial Communication it listed that even if the Arduino has multiple Serial Communication ports only one port will be used and because I am powering the Arduino through its USB port some collisions happened ( 0,1 to Bluetooth module and USB to the power )
using SoftWareSerial solved the problem.
thank you all