Testing Bluetooth write no output


#1

Hi :robot:

Initial setup: Megapi + Bluetooth module
My PC and the bluetooth module are paired, I use a Bluetooth Serial Terminal to check output.

The program I use is simple, it sends data to Bluetooth.

#include “MeMegaPi.h”
#include <SoftwareSerial.h>
#include <Arduino.h>
#include <Wire.h>

MeBluetooth bluetooth(PORT_5);
int i = 0;

void setup()
{
bluetooth.begin(115200);
}

void loop()
{ i++;
bluetooth.print(“Bt loop count.”);
bluetooth.println(i);
delay(1000);
}

I check the Bluetooth monitor but I cannot see output.

I also use this loop code:

void loop()
{
bluetooth.write(‘X’);
delay(1000);
}

And the problem is the same, I do not get output.

¿Some suggestions about?

Happy Weekend.
Kike.


#2

Hi kike,

Which Bluetooth serial terminal and Bluetooth monitor do you use? You may try use the serial assistant software sscom have a try.

Besides, do you use the Bluetooth module for mBot or the Me Bluetooth module with RJ25 port?

If it is the previous one, it is not connect to the RJ25 Port 5 on MegaPi shield, but the pin plug on the MegaPi. You may need figure out the port relationship for the pin plug on Megapi first. Here I attach the circuit schematic for megapi to you for reference.Schematic.zip (102.0 KB)


#3

Hi Tech_support.
I use BluetermFX and Bluetooth Serial terminal (from win 10 store). I will try the sscom.
The module I am using is the “Bluetooth module for mBot” which can be also used in the MegaPi card. According to the Megapi http://learn.makeblock.com/megaPi/, says the PORT5 is for bluetooth, but the one with the RJ25, so you are right. I have to figure out the correct port. I will check the schematic.

Thanks.


#4

Hi Tech_support.

I found it, the bluetooth module must be programmed as Serial3.
In the MegaPi board, appears TX3 and RX3, and the arduino mega has TX3 and RX3 also, and both cards have the same processor. To use the TX3/RX3, must code Serial3.


#5

Hi kike,

Good to hear that you figured it out, great Job!
Thanks for sharing it which would be also helpful for geeks.


#6