Go Down

Topic: Display The Node Communication Sequence on Multiceiver nRF24l01 (Read 63 times) previous topic - next topic


Hallo, I'm here creating a project about multiciver communication using nRF24l01. I have succeeded in doing so, but I am having trouble knowing the order of incoming data on the receiving node. Does anyone know how to display the order of nodes that send data on the receiver and can be displayed on the serial monitor


Yes, use available(&).

Like in this sketch that needs to filter incoming pipes to reload AckPayload data.

Code: [Select]
#include <RF24.h>

const byte rAddress[] =  "1Node" "2Node" "3Node" "4Node" "5Node";
byte ackData = 1;
byte theMessage[32];

RF24 radio(8, 10);

void loadAckData(byte pipe) {
  radio.writeAckPayload(pipe, &ackData, sizeof(ackData));

void setup(void) {
  for (byte i = 0; i < 5; i++) {
    radio.openReadingPipe(i + 1, &rAddress[i * 5]);

void loop(void) {
  byte pipeNum = 0;
  if (radio.available(&pipeNum)) {
    if (pipeNum == 2 || pipeNum == 3 || pipeNum == 4) {
    byte len = radio.getDynamicPayloadSize();
    radio.read(theMessage, len);
    Serial.print(F("received ["));
    Serial.print(F("] "));
    for (int x = 0; x < len; x++) {
      if (theMessage[x] < 16) {
      Serial.print(theMessage[x], HEX);
    Serial.print(F(" via "));

Posting your code could help to help you.
Ah, this is obviously some strange usage of the word 'safe' that I wasn't previously aware of. (D.Adams)

Go Up