mitxela.com forum
Welcome. Please log in or register.

Problem with flashed HC-05 and arduino uno
GiovanniPio Posted: 31 May 2018, 02:10 PM
Avatar


Member
Posts: 2
Joined: 31-May 18
Hey, people, I really need some help: I flashed my HC-05 module with RN-42 firmware, then i tried to hook it up as shown in the video linked below, but instead of using an arduino nano I'm using the uno. The problem is that RN-42 commands don't work in the serial monitor... In the hookup everything seems to work fine, the led blinks once per second, the code uploads succesfully, but then i write $$$ and press enter (or click send) and nothing happens.

Link to the video: https://www.youtube.com/watch?v=UJaqHnPR-XE&t=157s

Here's the code:

#include <SoftwareSerial.h>



SoftwareSerial bluetoothSerial(2,3);



void setup()

{

Serial.begin(9600);


bluetoothSerial.begin(9600);
}



void loop()

{

if (bluetoothSerial.available())

{

Serial.print((char)bluetoothSerial.read());

}

if (Serial.available())

{

bluetoothSerial.print((char)Serial.read());

}

}


(User posted image)


-------------
[top]
GiovanniPio Posted: 31 May 2018, 02:22 PM
Avatar


Member
Posts: 2
Joined: 31-May 18
I did some tests, turns out that the code blocks in this part of the loop function:


{

if (bluetoothSerial.available())

{

Serial.println((char)bluetoothSerial.read());

}


in order to show where there was a problem I wrote an else to this piece of code, like this:


if (bluetoothSerial.available())

{

Serial.println((char)bluetoothSerial.read());

}
else{
Serial.print("not_available_bt");
}



So, now that I know this, how do i solve it? Can you help me to find the problem?


-------------
[top]
DAVID Posted: 31 May 2018, 09:20 PM
Avatar
I love mcus

Member
Posts: 237
Joined: 10-September 17
or you can pop out the atmega328p from the socket and connect the rx pin of the hc05 to the tx of the arduino

-------------
[top]
DAVID Posted: 31 May 2018, 09:21 PM
Avatar
I love mcus

Member
Posts: 237
Joined: 10-September 17
or use the ftdi cable

-------------
[top]
DAVID Posted: 31 May 2018, 09:30 PM
Avatar
I love mcus

Member
Posts: 237
Joined: 10-September 17
and i test your code and it work fine for me
with the software serial port running at 115200 baud
but without the hc05 pullup on pio 7

Last edit by DAVID at 31 May 2018, 09:31 PM

-------------
[top]
DAVID Posted: 16 Jul 2018, 02:46 PM
Avatar
I love mcus

Member
Posts: 237
Joined: 10-September 17
did you check that the hc05 has power at the 3.3v regulator??

-------------
[top]

Sign in to post a reply.