RF link kit

Hello everyone,

Hope you can help me, please:)

I have bought this RF link kit(seeedstudio.com/depot/433mhz … th=139_140). When I want to send a message from an arduino(let’s call it “A”) to another arduino(“B”), everything is fine: the Arduino “A” send the message using the transmitter, and the Arduino “B” get it through the receiver. The problem is when I want to add the transmitter and the receiver on the same Arduino. For example, if I try to send a message by the transmitter on the Arduino “A” to the receiver always on the same Arduino, the message is sent, but it doesn’t receive it.

I use the Virtual Wire 1.9 library: open.com.au/mikem/arduino/VirtualWire.pdf

Any idea why?

Thank you so much!

Dear customer,

You said Arduino A send to B is OK. But why you ask always on the same Arduino?
Add the transmitter and the receiver on the same Arduino©? It is the one on the A and B?
Or you want to send massage then receiver by itself?

There shouldn’t too close to use with them. At least might be 30~100CM.

Hope can help you.

Best regards,

Yuri

Hi~
In my opinion , that’s impossible unless that you can send message and receive messgae simultaneously , mean that the send code and the receive code running in the same time . Others , if you are successful do that , please share the experience .

deray

Hi everyone,

First of all, thank you so much for your answers. :smiley:

Yuri - Yes, I would like to add the transmitter and the receiver on the same Arduino©. They’re the same I use on the A and B. So that the Arduino C is able to send and receive.

Deeray - Unfortunately, I’m unsuccessful :frowning:

However, I found a way (that suits my project) to avoid using the transmitter+receiver on the same Arduino; I simply add the transmitter to Arduino A, and the receiver to Arduino B. Unfortunately, I still have a problem: when I send a message(for example “hello”) from Arduino(A) to Arduino(B), the B get that: “68 65 6C 6C 6F” instead of “hello”. I suppose that’s the HEX code for “hello”, but any idea how to get the word “hello”?

Transmitter code:

const char *msg = "hello"; vw_send((uint8_t *)msg, strlen(msg)); delay(400);
Receiver code:

uint8_t buf[VW_MAX_MESSAGE_LEN]; uint8_t buflen = VW_MAX_MESSAGE_LEN; int i; for (i = 0; i < buflen; i++) { Serial.print(buf[i]); Serial.print(" "); }

Thank you very much again for your help.

What u r receive is right.
I wan to know what kind of the Serial Software you are using?
It show the HEX data I think it is the Serial Software’ problem,maybe your turn on the “show HEX” on the Serial Software.
So find that button and turn it off,that it will show “hello” correctly :smiley:

Yeah, thank you very much, I added (char) before buf[i] and I get it as “hello” :smiley:

for (i = 0; i < buflen; i++) { (char)buf[i]; }

:slight_smile:)