I think I have a defective HC-06 but thought I'd see if I could learn a bit more from the collective wisdom here
Basically, using pins 12/13 as TX/RX connected via SoftwareSerial I can connect to the HC-06, write() to it in code, which then appears on my Windows 10 bluetooth serial console or on my Android BT serial console, but I never get any input. I've tried with no terminator, with LF and with CR/LF - all the same.
So just to check:
Am I right that the fact that I can write() on the arduino to the BT device and see the messages on my devices means that I have the right baud rate and that the transmit side is working ?
How is the baud rate negotiated when the BT connection is set up ? I realise the HC-06 is 9600 by default, but mine originally connected at 38400. However I can change this writing the relevant "AT+BAUDx" commands to the device and then using BT.begin(xxxx) where xxxx is the baud rate I've set.
Does it sound like the RX line of my HC-06 is knackered ? I've checked out the cable, all fine, and tried a different arduino pin so I can't see any other possibilities. I've ordered another HC-06 so I should have a better idea on this tomorrow.
I didn't use the voltage divider with it, maybe I just got lucky before.
It is clearly good practice to use the divider but I have never actually heard of a module failing due to its absence, and about half of the diagrams in Google images don't include it. Maybe you are the first, but there could be something else going on.
Turned out to be a board problem ... the BT sketch works 100% with my genuine Arduino Uno on both hardware and software serials, and software serial fails 100 times out of 100 on my Elgoo board where only the first character is received correctly and the rest are always randomly garbled. Hardware serial works 100% on the Elgoo.
When I add the BT code into the self-balancing code it only works at all at 38400 baud though this still crashes the robot once all the data has been read. At lower speeds it crashes - I think this is because the FIFO buffer on the MPU6050 overflows before it can be emptied, though this is still a working theory. I haven't tried higher speeds, I don't think the HC-06 even supports higher speeds than 38400.
I would put this all down to pilot error or user abuse before blaming any hardware. At a guess, it is all down to your insistance in using software serial.
Software serial is never a good idea - ever. I imagine your situation is about the worst possible arena for software serial and, if forward speed is your problem, engaging reverse is not a good idea.
Using software serial at 115200 is a sure recipe for disaster. I don't know anything about Elgoo, but the board is probably working normally. I'm betting you didn't get something useful on software serial at 115200 on the Uno, you just think you did, but, if that really was the case, you can put it down to good luck rather than good management, and don't expect it to be normal - no matter what serial device you may be using.
HC-06 will run just fine at 115200 - on hardware serial