One nrf transmitter to two nrf receivers using arduino

I have no errors but only one receiver is getting data and while the other is not. I created 2 radio objects for different channels in the transmitter. Both my receivers work in different channels.I have attached my Arduino code for all the three.Please help me . Thank you.

rece.ino (714 Bytes)

tran.ino (688 Bytes)

rec2.ino (680 Bytes)

RF24 radio(7, 8);
RF24 radio2(7,8);

How many radios are actually attached to those pins?

This rf24 tutorial with example code might help.

Two radios. Initially I created only one radio but both the receivers didn't get any data. So I created two for two different channels .

Two radios. Initially I created only one radio but both the receivers didn't get any data. So I created two for two different channels .

You have two radios physically connected to the same set of pins? Why on earth would you do that?

PaulS:
You have two radios physically connected to the same set of pins? Why on earth would you do that?

I didn’t connect two . I mean I connected one nrf but created two radio objects . I have connected only nrf with arduino

A single radio can send to more than one other radio. In the transmitter, you want ONE instance of the class. You want that one instance to use two different pipes to send to two different radios.

Have a look at the examples in the link in Reply #2

You only need one radio object.

...R

PaulS: You want that one instance to use two different pipes to send to two different radios.

Alas, this is not correct. There is only one transmitting pipe. Multiple pipes are for the receiver, not the sender. In practice it is probably not necessary for the receiver to use multiple pipes either.

The transmitter needs to choose the address of the receiver before it sends its message. Each "receiver" needs to be given a separate address.

...R

Alas, this is not correct.

Thanks for politely calling me a doofus. 8)

Robin2: Have a look at the examples in the link in Reply #2

You only need one radio object.

...R

I saw those programs . I tried them too. When I created only one radio object and sent data both receivers showed they didn't receive data.

aajv: I saw those programs . I tried them too. When I created only one radio object and sent data both receivers showed they didn't receive data.

If you post the programs that YOU uploaded to your Arduinos I will try to help. Also post some of the output that the programs produced.

As far as I know the examples do work, but if there is a problem I would like the opportunity to fix it.

...R

[OT]

Robin2: Each "receiver" needs to be given a separate address.

That is not true.

There may only be one receiver with enabled AutoAck per address, that does not imply that the addresses of the receivers have to be different, all could share the same address, but at most one of them may enable AutoAck.

[OT]

Whandall: [OT]

That is not true.

I know. But I thought it was a reasonable simplification in this case.

...R

I don't feel that simplification justifies false information. :confused:

The transmitter needs to choose the address of the receiver before it sends its message.

I think "The transmitter needs to choose one address before it sends its message." would be less misleading too. Your wording implies a personal address for each node, which receivers do not have to have.

Whandall:
I don’t feel that simplification justifies false information. :confused:

I think “The transmitter needs to choose one address before it sends its message.” would be less misleading too.
Your wording implies a personal address for each node, which receivers do not have to have.

I don’t consider what I said to have been false information in the context of the Original Post. And I did mean to imply the notion of a “personal address”.

I think it is easier if a newbie sees it from that perspective to start with rather than listing all the options.

…R

I resolved it by creating only one radio and change channel before transmitting . Thank you for your guidance :)