Go Down

Topic: Arduino Due and HC-05 (Read 938 times) previous topic - next topic

danieloba

Hello guys.
Recently I bought a bluetooth device (HC-05) and tried just to turn on a led by any arduino Bluetooth apps that we can find in the playstore. Then I downloaded the app ArduinoRC. I did the connection of the bluetooth device with the arduino Due like Due RX (RX0) with Bluetooth TX and Due TX (TX0) with Bluetooth RX. Everything went fine, the Bluetooth device was sucessfully connected with the app. Butbwhen I send the data to the Bluetooth device nothing happens.
I tried the Blink example adding the serial commads. I tried to test using the serial monitor and with it I was able to turn on and off the led.
Could anyone help me to how can I do to this work?

Kind regards,
Daniel Oliveira Barbosa

RidgyFive64

Do you have an example of the code that is uploaded to the board?

danieloba

There is my code that I uploaded.
The communication doesn't work only on TX0/RX0 even if I use an external font to turn on the Arduino Due.

void setup()
{
Serial.begin(38400); // Default Baud rate of HC-05
pinMode(8, OUTPUT); //Pin Led

}

void loop()
{
char c;
if (Serial.available())
{
 c = Serial.read();

 if (c == 'l' || c == 'L')
 {
    digitalWrite (8, HIGH);
 }

 if (c == 'd' || c == 'D')
 {
    digitalWrite (8, LOW);
 }

}

}

lesisas

Hi
Hello guys.
Recently I bought a bluetooth device (HC-05) and tried just to turn on a led by any arduino Bluetooth apps that we can find in the playstore. Then I downloaded the app ArduinoRC. I did the connection of the bluetooth device with the arduino Due like Due RX (RX0) with Bluetooth TX and Due TX (TX0) with Bluetooth RX. Everything went fine, the Bluetooth device was sucessfully connected with the app. Butbwhen I send the data to the Bluetooth device nothing happens.
I tried the Blink example adding the serial commads. I tried to test using the serial monitor and with it I was able to turn on and off the led.
Could anyone help me to how can I do to this work?

Kind regards,
Daniel Oliveira Barbosa
Hi,

Are you sure ArduinoRC app will sent to HC-05 such chars in your code. At first your code should print out received chars.

Regards,

Go Up
 


Please enter a valid email to subscribe

Confirm your email address

We need to confirm your email address.
To complete the subscription, please click the link in the email we just sent you.

Thank you for subscribing!

Arduino
via Egeo 16
Torino, 10131
Italy