HC-05 trouble sending and receiving on Arduino Mega

I am using an HC-05 bluetooth module which I have wired up using the voltage divider for the Rx pin as well. When establishing a connection with my android phone or even PC it does this successfully, both on PC and on phone. However when I try to test the send and receive using the serial monitor on PC and bluetooth terminal on phone I do not see anything displayed when it is connected to the Arduino Mega. But when I test this on my Arduino Uno, it seems to work fine and displays the serial data. I am not sure what the issue is, can anyone help me out with identifying the problem? Could it be the input voltage is not enough? As my 5V output from the arduino is shared amongst 2 other sensors and the motor driver circuit. Or is it that my arduino Mega RX and TX pins are faulty? any way of testing these?

I am not sure what the issue is,

Your code, probably.

Or is it that my arduino Mega RX and TX pins are faulty?

Which ones? If you are referring to pins 0 and 1, those are the ones used to upload sketches, and write to the Serial Monitor. It is unlikely that they are faulty.

Possibly even your codes - plural - since, if you really are doing what you say you are doing, it shouldn't work on the Uno either. But nobody will ever know because you are so secretive about the code.

What you are probably trying to do is communicate between phone and serial monitor, with Arduino as an intermediary, using code designed for communication between phone and Arduino. The latter is quite likely what you really want to do. The former is easily obtained anywayt by having the appropriate software, which I bet you are not using. In the case of the Mega, you even have two options - software the same as Uno, or moving bluetooth to serial1.

You might find the following background notes useful


While the 5v is not likely to be the problem. It would be smart to solve the bluetooth issue with the motor disconnected.