Dear community,
I'm working on a project with an Arduino Due and a PCI board. When I power on the arduino, i can't access the serial monitor using the bluetooth HC-06. If i access the monitor using the programming port in Arduino Due, i could see the software running and after this i'm able to reach the serial monitor on bluetooth. I've already read my code and the is no difference between access between USB or Bluetooth,
Anyone have a guess on it?
Your description is not really clear to me. Serial should be dedicated to communicate with the Serial monitor and use another Serial (e.g. serial1, Serial2, Serial3 or Serial4) to communicate with the bluetooth module. Anyway, this blog might help you out with the HC-06 module:
Maybe you have an issue after a power down, the sketch don't run. There are several workarounds if this is the issue:
-
Write a delay(1000); at the beginning of the setup() part. When you power your board thru the programming port, connect the cable for 1 second, then unconnect the cable and connect again the USB cable. This time the sketch should run.
-
Another workaround is to add a capacitor (there is a long thread related to this issue somewhere in the DUE sub forum).
rsardinha:
can't access the serial monitor using the bluetooth HC-06
Nobody else can either - no guessing about that. Use a proper terminal programme, like RealTerm, instead and you will be OK. Realterm is a freebie, there are several others.
Hello.
I’m using an arduino due in a telescope project with an hc-06 module. After starts the serial monitor using the programming port, I can connect through Bluetooth in my Mac or android. If I power on the arduino due and try to access the Bluetooth serial monitor first it not respond. So if I access using the usb and after I use the Bluetooth It works as expected.
I don’t know what I m doing wrong. Could you help me guys?
Problem could be with the code that you didn't post.
Sorry, I forgot to post my code. It follows attached.
Setup.ino (2.05 KB)
Serial.ino (3.08 KB)
MotorControle.ino (6.78 KB)
LX200Command.ino (38 KB)
FuncoesUtils.ino (6.07 KB)
FIREGOTO.ino (8.55 KB)
CordenadasFuncoes.ino (7.37 KB)
CoordsLib.h (5.82 KB)
CoordsLib.cpp (6.62 KB)
I think I don't get you a more detailed description. The project Is to control 2 step motors of my telescope using LX200 ASCOM Protocol. It is controlled througth HC-06 module. It was expected that I could connect directly using BT, but I get a timeout using serial monitor. If I change the communication to programming port on Arduino IDE, I can see the monitor, after disconnecting and pairing the BT, I'm able to connect in serial monitor through BT.
Setup.ino (2.05 KB)
Serial.ino (3.08 KB)
MotorControle.ino (6.78 KB)
LX200Command.ino (38 KB)
FuncoesUtils.ino (6.07 KB)
FIREGOTO.ino (8.55 KB)
CordenadasFuncoes.ino (7.37 KB)
CoordsLib.h (5.82 KB)
CoordsLib.cpp (6.62 KB)
I don't suppose anybody will bother to read that. Please post your code in the normal manner using </> tags, as described in the "how to use" notes.
I'm doing this in setup:
void setup() {
pinMode(LedR, OUTPUT);
pinMode(LedG, OUTPUT);
pinMode(LedB, OUTPUT);
digitalWrite(LedR, ledStateR);
digitalWrite(LedB, ledStateB);
digitalWrite(LedG, ledStateG);
if (ledStateR == LOW) {
ledStateR = HIGH;
} else {
// ledStateR = LOW;
}
digitalWrite(LedR, ledStateR);
Serial.begin(9600);
Serial3.begin(9600);
SerialUSB.begin(9600);
In serial.h there is a function to send the output to monitor:
void SerialPrint(String str)
{
Serial.print(str);
Serial3.print(str);
SerialUSB.print(str);
ledStateB = HIGH;
}
The strange behaviour is that can connect only using Bluetooth after connect by USB.
I'm doing this in setup:
void setup() {
pinMode(LedR, OUTPUT);
pinMode(LedG, OUTPUT);
pinMode(LedB, OUTPUT);
digitalWrite(LedR, ledStateR);
digitalWrite(LedB, ledStateB);
digitalWrite(LedG, ledStateG);
if (ledStateR == LOW) {
ledStateR = HIGH;
} else {
// ledStateR = LOW;
}
digitalWrite(LedR, ledStateR);
Serial.begin(9600);
Serial3.begin(9600);
SerialUSB.begin(9600);
In serial.h there is a function to send the output to monitor:
void SerialPrint(String str)
{
Serial.print(str);
Serial3.print(str);
SerialUSB.print(str);
ledStateB = HIGH;
}
The strange behaviour is that can connect only using Bluetooth after connect by USB.
Why don't you just bite the bullet and post the whole code? At the moment you seem to be purposely trying to confuse everybody. Also, some comment on the Arduino you are using, and how it is connected to whatever might be helpful. This particularly applies because the command
SerialUSB.begin(9600);
is pretty rarely used. Much the same can be said about serial.h. I never knew it existed.
@rsardinha
TOPIC MERGED.
Could you take a few moments to Learn How To Use The Forum.
Other general help and troubleshooting advice can be found here.
It will help you get the best out of the forum.