ESP32-WROOM-32
I had been doing this earlier but thought that both master and slave had to be ESP32 boards since the BluetoothSerial library is not compatible on the Uno. But, I used the BT master code on the ESP32 and the SoftwareSerial library on the uno and the boards connected! Note that the boards have to be extremely close to one another.
For reference, I uploaded the SerialToSerialBTM example on to the ESP32 (changed baud rate to 9600) and the following code (from @GolamMostafa) for the Uno:
#include <SoftwareSerial.h>
SoftwareSerial SUART(13, 12); // SRX = 10, STX = 11
void setup()
{
Serial.begin(9600);
SUART.begin(9600);
}
void loop() {
if (SUART.available())
{
char x = SUART.read();
Serial.print(x);
}
if (Serial.available()) {
char c = Serial.read();
SUART.print(c);
}
}
While there is connection, the data is gibberish. I opened both SM at a baud rate of 9600 and have NL & CR on. Why is the data incorrect?