hi,
i've bought a dfrobot v3 bluetooth module to connect to arduino MEGA 2560.
i was able to connect it to Arduino using TX and RX pins and to connect it to an android smartphone.
Then i used the serial monitor to communicate with smartphone.
The Serial monitor was able to send letters to the smartphone, but when i tried to send letters by smartphone to serial monitor it didn't receive anything.
connection: pin 16 (TX2) to RX module
pin 17(RX2) to TX module
BAUD RATE: 9600
i even tried to switch RX and TX pins, but it doesn't communicate on both sides.
trovez:
i was able to connect it to Arduino using TX and RX pins and to connect it to an android smartphone.
.........
i even tried to switch RX and TX pins, but it doesn't communicate
I guess you have now concluded that switching the pins was as about the most futile thing you could ever gave done. Since your code is a state secret, the best guess is that you have a serial input problem, so try here. It may be that you are simply listening on the wrong port.
You might also find the following background notes useful.
trovez:
the code i used is one of the many code examples for bluetooth communication.
#include <SoftwareSerial.h>
SoftwareSerial SSerial(17, 16); //17 RX e 16 TX
Clearly junk code, written by an idiot. Never run software serial on hardware serial pins, and I bet you have no good reason for running software serial on a Meg anyway, and probably never will.