how to set up the address NRF24 in topology??????

HI,

If i have the address of the ffg:

master ====== 000

const uint16_t other_node = 000;

node1 ======001

const uint16_t this_node = 001;
const uint16_t other_node = 000;

( Under node1 there is another nrf24 thier address are: ) node1.1 ===== 011

const uint16_t this_node = 001;
const uint16_t other_node = 000;
const uint16_t this_node = 011;

node1.2 =====111

const uint16_t this_node = 001;
const uint16_t other_node = 000;
const uint16_t this_node = 011;
const uint16_t this_node = 111;

Is this correct ?

thanks.

alexanderbel: HI,

If i have the address of the ffg:

master ====== 000

const uint16_t other_node = 000;

node1 ======001

const uint16_t this_node = 001;
const uint16_t other_node = 000;

( Under node1 there is another nrf24 thier address are: ) node1.1 ===== 011

const uint16_t this_node = 001;
const uint16_t other_node = 000;
const uint16_t this_node = 011;

node1.2 =====111

const uint16_t this_node = 001;
const uint16_t other_node = 000;
const uint16_t this_node = 011;
const uint16_t this_node = 111;

Is this correct ?

thanks.

alexanderbel: HI,

If i have the address of the ffg:

master ====== 000

const uint16_t other_node = 000;

node1 ======001

const uint16_t this_node = 001;
const uint16_t other_node = 000;

( Under node1 there is another nrf24 thier address are: ) node1.1 ===== 011

const uint16_t this_node = 001;
const uint16_t other_node = 000;
const uint16_t this_node = 011;

node1.2 =====111

const uint16_t this_node = 001;
const uint16_t other_node = 000;
const uint16_t this_node = 011;
const uint16_t this_node = 111;

Is this correct ?

thanks.

Hi, have you tried to run it? What happened?

how the compiler shoud know wich this_node to choose?

i dont think you can do it like that...

best regard,

yoav

Hi,

Post your own question regarding this matter @yoavshtainer, do not cross-post. You should have read the rules before posting.

Cheers.

@alexanderbel, post a complete program, not just snippets. Without the context your snippets are meaningless.

...R

Hi Robin,

I do not have the complete codes yet, I just want to learn on how to set addresses with the master and the multiple slaves, so they could communicate to each other.

I hope you could guide and help me to solve my problem.

Cheers,
Alexanderbel

The line

radio.openReadingPipe(1,deviceID);

opens a reading pipe and listens for messages addressed to the number in the variable deviceID. In effect, deviceID is the address of the listener.

The line

radio.openWritingPipe(deviceID);

opens the writing pipe for transmission to send messages with the address set to the number in deviceID

If you require to send data to several different devices at different times your transmission code could have an array of ID numbers.

Does that help?

…R

Hi Robin,

What if it is the other way around? i want many different devices to transmit to one listener?
how should i write the array for that? :slight_smile:

cheers! :slight_smile:

alexanderbel:
What if it is the other way around? i want many different devices to transmit to one listener?
how should i write the array for that? :slight_smile:

Then you don’t need any array. There is only one receiver with one address. Each sender needs to use that address. (Think of all your friends sending you birthday cards).

One problem, however, is that you want to ensure that the senders operate one at a time.

The simplest way to ensure that may be to get the master to initiate all the communications - calling each slave in return. That would require the master to have an array of addresses - one for each slave. The slaves can use writeAckPayload() to send data back to the master automatically.

I have not tried it but I believe the master can listen on up to 6 pipes simultaneously and I presume that is the equivalent of having 6 different addresses that the birthday cards could be sent to.

…R

Robin2:
I have not tried it but I believe the master can listen on up to 6 pipes simultaneously and I presume that is the equivalent of having 6 different addresses that the birthday cards could be sent to.

I have tried it and any device in receive-mode can use 6 pipes in parallel (3 with ack-payload).

Robin2:
Then you don’t need any array. There is only one receiver with one address. Each sender needs to use that address. (Think of all your friends sending you birthday cards).

One problem, however, is that you want to ensure that the senders operate one at a time.

The simplest way to ensure that may be to get the master to initiate all the communications - calling each slave in return. That would require the master to have an array of addresses - one for each slave. The slaves can use writeAckPayload() to send data back to the master automatically.

I have not tried it but I believe the master can listen on up to 6 pipes simultaneously and I presume that is the equivalent of having 6 different addresses that the birthday cards could be sent to.

…R

Robin2:
Then you don’t need any array. There is only one receiver with one address. Each sender needs to use that address. (Think of all your friends sending you birthday cards).

One problem, however, is that you want to ensure that the senders operate one at a time.

The simplest way to ensure that may be to get the master to initiate all the communications - calling each slave in return. That would require the master to have an array of addresses - one for each slave. The slaves can use writeAckPayload() to send data back to the master automatically.

I have not tried it but I believe the master can listen on up to 6 pipes simultaneously and I presume that is the equivalent of having 6 different addresses that the birthday cards could be sent to.

…R

Hi Robin,

Thank you for giving me that idea, it helped me a lot.
I am going to try it once I have completed the devices that I will be using.
I hope I can still ask you questions regarding this project when I encountered some problems.

Cheers,
Alexanderbel

Whandall: I have tried it and any device in receive-mode can use 6 pipes in parallel (3 with ack-payload).

Hi Whandall,

Are you open to share the codes you used for the receive mode 6 pipes? Can you consider posting it here?

Cheers, Alexanderbel

I'm in the process of finishing a library that makes it easy to use pipes in whichever way you like.

  • interrupt driven
  • delivers packets and events via callbacks
  • supports data (packets, addresses) from PROGMEM or EEPROM
  • supports acknowledge payload and it's automatic reload
  • features automatic timed sends
  • nodeId (1 byte) from EEPROM
  • nodeId injection in packets from PROGMEM or EEPROM
  • some other neat featuresI will release that library in the near future, but I need to generate more examples, documentation and some overhaul of the way events are passed.

So if you have suggestions for special examples you want to see, let me know.

At the moment I finished to move all my small nodes to the new library, checking for incompatibilities and things that have to be accessible (or hidden). Each of the nodes has three pipes without, and one personal pipe with acknowledgement (node id from EEPROM).

Using the standard library you just have to open 6 pipes to receive on six pipes, the only stumbling block is to get the addresses right, remember that pipes 1 to 5 have to share the top 4 bytes.

Hi Whandall,

I owe you one. You're doing a great work. I'm looking forward to see that library in the future.

How will I know if you already posted that library, do you have a blog site you used for your work?

To give you an example, or the suggestion, what if I have the master node connected with 6 slaves, and on each oh these slaves there is another connected node to that said slave..

Cheers, Alexanderbel