How to send information between 2 HC-05?

I need to send a number from 1 Arduino to another using 2 HC-05. I have followed the AT setup and connection in this video I have successfully connected 2 HC-05 module but I can't get the master to send a relatively large number to the slave. I uploaded my code and result--serial command is the slave's (Basically I want the slave to receive the number and print onto serial screen, but it doesn't happen)

Another question is if I want to send 3 integers in a row (Like 23, 34, 56) and let the other receive as 3 different integers (int1=23, int2=34, int3 = 56), how do I do that?

Btw, how do I suppose to upload the files to Arduino properly? When I have the TX->RX0; RX->TX1 (Bluetooth pin to Arduino pin), I can't upload the file. I have to disconnect and upload, then it seems to upload but doesn't work properly.

Thanks in advance.

Picture of How to send information between 2 HC-05?
sort by: active | newest | oldest
iceng9 months ago

Pick another two pins set as TX, RX...

the code load TX, RX are specially software bound to look for control
codes and placement to memory... You want one bit for one bit interpretation...

I would first try direct wire communication and then insert HC-05 after flawless TTL works....

Do you know how to write code or are you inserting code without modification ??

Shizen (author)  iceng9 months ago

I'm completely new to serial connection so I just insert the code without any modification, can I have some guide please?

iceng Shizen9 months ago

This text box is too small to teach a semester of high school programming let alone Hexadecimal numbering system of changing decimal to binary bits...

Consider this;

Decimal 13 is Binary 00001101 is Hex 0D is Octal 015 is Character CR ........................the control Character for a carriage_return...

Dec 49 is Bin 00110001 is Hex 31 is Character 1

Dec 51 is Bin 00110011 is Hex 33 is Character 3

Dec 65 is Bin 01000001 is Hex 41 is Character A and finally

Dec 122 is Bin 01111010 is Hex 7A is Character z .....

In your head what is the Decimal value of Binary 01000100 Char D ??

Shizen (author)  iceng9 months ago

lol, I actually learn Binary, Decimal and Heximal before

01000100 in Decimal is 68, meaning Hex 44, character 'D'

I was taught how to convert them, not how to use them....

iceng Shizen9 months ago

Sure makes sense if 65 is 'A',,, 66 is 'B'... 67 is 'C'... THeN 68 has to be 'D'...

Ever notice the numbers start out with a 3n Hex makes decoding a snap...

Just head over to the Arduino Playground and check the examples for the serial write and serial read command or for serial communication in general.
Take some of the examples to test that you setup and connection is actually working as planned.
After that you already know where you went wrong before and can implement what Steveastrouk suggested.

People always underestimate how much info you can find in the playground...

Downunder35m9 months ago

You do realise that a serial connection only uses 8 bit?

Shizen (author)  Downunder35m9 months ago

Oh, so the maximum is 127 or 255? I didn't know that...

No, you use ASCII, and send the number as strings so your number 1234 is sent as characters, like "1""2""3""4" and then character &0D

Shizen (author)  steveastrouk9 months ago

I need to read more on the communication itself, I can turn from char to int.

However, I don't know how to send the character from 1 to another Arduino, that's what I'm looking for right now

One end transmits <CR>DATA<LF> The other picks up the <CR> as the start of a message, and buffers the data until it picks up <LF> then it parses it.

Shizen (author)  steveastrouk9 months ago

Ok, thanks, I think I can start looking around now

Before I have no idea on what to look up...

Which is

Decimal 13 is Binary 00001101 is Hex 0D is Octal 015 is Character CR ........................the control Character for a carriage_return...

Shizen (author)  iceng9 months ago

OHHHHHHH, that make so much sense now. I just check ASCII table again, now I understand what the first column is about (before I only work with characters)