Hello, I am currently using the arduino mega 2560 with an HC-06. I am also using an app on my smartphone(android). The problem that I have is that my Arduino Mega is not recieving anything, the leds of the tx/rx are also not going on on the Arduino Mega.
#include <SoftwareSerial.h>
SoftwareSerial mySerial(18, 19); // RX, TX
char Message;
void setup() {
Serial.begin(9600);
while (!Serial) {
; // wait for serial port to connect. Needed for native USB port only
}
// set the data rate for the SoftwareSerial port
mySerial.begin(9600);
}
void loop() {
if (Serial1.available() > 0) {
Message = Serial1.read();
Serial.println(Message);
}
}
When you have worked out the issues with the Mega and changed to one of the additional hardware serial instances, it would be best to validate the setup with a well used and well tested commercial phone app rather than your app inventor code. That way, potential issues with the sending code can be separated from issues with the receiving code.
TX on the HC-06 goes to RX1 on the Mega, RX to TX1, with logic level shifters between.
You must use logic level converters to interface 3.3V and 5V components, or you will damage them. I recommend this one: https://www.sparkfun.com/products/12009
A voltage divider is fine, it has nothing to do with the baud rate. You have to configure Bluetooth to run at 115200, if that is what you want, but you might as well stick with 9600 for now.
Never had a problem at 115200. All my Blueteeth run at that rate. I've never heard of anybody else having a problem either. If it was a problem, it would probably have come up by now. Similarly, while only a fool would say don't bother with it, I have never heard of anybody actually frying their Bluetooth for absence of the divider, so I hope OP didn't panic too much.