For my project, I’m trying to have an Arduino Mega receive data from a device with a RS-232 port, send this data to another Arduino Mega via Bluetooth, and dump the Serial data onto my computer.
I paired the two bluetooth modules following the directions on the datasheet, then tested sending Serial data using two computers (sending Serial data through Arduino Serial monitor). At this stage, everything worked perfectly.
I started testing the Arduinos on the device and realized that I needed to change my baud rate to 38400 to match the device data output. On my sketch, I changed the baud rate of the bluetooth and Serial to 38400. Now, I can’t seem to send or receive any data through the Bluetooth.
The two modules are still pairing, but data won’t be sent through Bluetooth. I was hoping someone could help me solve this problem. Thank you in advance,
An Arduino noob
#define TX 2
#define RX 3
SoftwareSerial bluetooth(TX,RX); // Setup bluetooth pins
bluetooth.begin(115200); // default baud of bluetooth gold
bluetooth.print("$"); // enter cmd mode
bluetooth.println(“SM,6”); // pair mode
bluetooth.println(“SR,00066663232E”); // set address
bluetooth.println(“C,00066663232E”); // connect to address
bluetooth.println(“U,38400,N”); // set