Hi Slav,
I’m interested in how you got the Bluetooth to receive TX. I’ve paired it and can get RX back to my computer but the module doesn’t take the TX. Over USB all the commands work in the code to control it but not over the bluetooth medium. Any suggestions would be great. I’ve added my current test code for ref and I’m using a terminal emulator to connect and send commands. It seems the “if(bluetooth.available())” never picks up over the bluetooth but it works over the usb fine.
#include <Makeblock.h>
#include <Arduino.h>
#include <SoftwareSerial.h>
#include <Wire.h>
MeBluetooth bluetooth(PORT_5);
char inDat;
char outDat;
void setup()
{
Serial.begin(115200);
Serial.println( “Start!”);
delay(200);
bluetooth.begin(115200);
bluetooth.println(“BT Start”);
}
void loop()
{
if(bluetooth.available())
{
inDat = bluetooth.read();
bluetooth.println(“available”);
Serial.print(inDat);
bluetooth.println(“BT worked”);
if(inDat==105){
Serial.println(“motor forward”);
bluetooth.println(“BT Fwd”);
}
if(inDat==107){
Serial.println(“motor backward”);
}else{
Serial.write(“broken”);
}
}
if(Serial.available())
{
outDat = Serial.read();
bluetooth.write(outDat);
Serial.write(outDat);
Serial.println(“good”);
Serial.flush();
}
}