nrf24l01 multiple pipe connection issue

Hi guys its me again and havig problem about sending data in multiple pipes of nrf24l01. on the transmitter side i can read my commands on serial monitor without any issue however on the rx side, radios are communicating but dont do my commands from the tx side. I am planning to use 1 tx and 3 rx modules and I wrote 3 pipes.rx codes are gonna be same with only pipe numbers changed. I get Nothing happens message on the rx side. Is it because of the pipes?

#include <Bounce2.h>

#include <SPI.h>              /////TX
#include "nRF24L01.h"
#include "RF24.h"
byte msg[1];          

RF24 radio(9, 10);
const uint64_t pipe[3] = {0xE8E8F0F0E1LL, 0xE8E8F0F0E2LL, 0xE8E8F0F0E3LL};

byte Select_sitstart = 3;
byte Select_onfoot = 4;
byte OnYourMarks = 8; //bounce
byte Set = 7;       //bounce
byte Reset = 6;     //bounce
byte GunSensor = 5; //bounce


Bounce OYM = Bounce();
Bounce set_one = Bounce();
Bounce reset_one = Bounce();
Bounce gun_one = Bounce();

void setup(void)
{
  pinMode(GunSensor, INPUT);
  pinMode(Select_sitstart, INPUT);
  pinMode(Select_onfoot, INPUT);
  pinMode(OnYourMarks, INPUT);
  pinMode(Set, INPUT);
  pinMode(Reset, INPUT);

  OYM.attach(OnYourMarks);
  set_one.attach(Set);
  reset_one.attach(Reset);
  gun_one.attach(GunSensor);

  OYM.interval(10);
  set_one.interval(10);
  reset_one.interval(10);
  gun_one.interval(10);

  Serial.begin(9600);
  radio.begin();

  radio.openWritingPipe(pipe[1]);
  radio.openWritingPipe(pipe[2]);
  radio.openWritingPipe(pipe[3]);

  radio.setChannel(108);
  radio.setDataRate(RF24_1MBPS);
  radio.setPALevel(RF24_PA_HIGH);

}

void loop(void)
{

  byte sit = digitalRead(Select_sitstart);
  byte foot = digitalRead(Select_onfoot);


  OYM.update();
  set_one.update();
  reset_one.update();
  gun_one.update();

  byte val_oym = OYM.read();
  byte val_set = set_one.read();
  byte val_reset = reset_one.read();
  byte val_gun = gun_one.read();

   


  if (sit == HIGH)

  {
              
    
            //Serial.println("SITSTART");
            //delay(500);
            
            if (val_oym == HIGH)
            {
             
              msg[0] = 111;   //// poles red
              radio.write(msg, 1);
              Serial.println(msg[0]);
            }
        
            if (val_set == HIGH)
            {
              msg[0] = 112;   //// ground yellow
              radio.write(msg, 1);
              Serial.println(msg[0]);
            }
           
            if (val_gun == HIGH) ///////NORMALLY CLOSED !!!
            {
              msg[0] = 113;   //// ground green
              radio.write(msg, 1);
              Serial.println(msg[0]);
            }
        
            if (val_reset == HIGH)
            {
              msg[0] = 114;
              radio.write(msg, 1);
              Serial.println(msg[0]);
            }
    
          
  
  
  
  }
  
////////////////////////////////////////////////////////////////////////
  
      if (foot == HIGH)  
      {
        
        
        
            //Serial.println("ONFOOT");
            //delay(500);  
            
            if (val_oym == HIGH)
            {
              msg[0] = 111;   //// poles red
              radio.write(msg, 1);
              Serial.println(msg[0]);
            }
        
            if (val_gun == HIGH) ///////NORMALLY CLOSED !!!
            {
              msg[0] = 113;   //// pole green
              radio.write(msg, 1);
              Serial.println(msg[0]);
            }
        
            if (val_reset == HIGH)
            {
              msg[0] = 114;
              radio.write(msg, 1);
              Serial.println(msg[0]);
            }
        
        
                
        
      }


}
#include <Bounce2.h>
                          /////RX
#include <SPI.h>
#include "nRF24L01.h"
#include "RF24.h"
byte msg[1];          

RF24 radio(9, 10);
const uint64_t pipe[3] = {0xE8E8F0F0E1LL, 0xE8E8F0F0E2LL, 0xE8E8F0F0E3LL};


byte green_mos_gnd = 3;   ////ground leds
byte orange_mos_gnd = 4;

byte green_mos_pole = 5;    //// pole leds
byte red_mos_pole = 6;

void setup(void) {
  pinMode(green_mos_gnd, OUTPUT);
  pinMode(orange_mos_gnd, OUTPUT);

  pinMode(green_mos_pole, OUTPUT);
  pinMode(red_mos_pole, OUTPUT);

  Serial.begin(9600);
  radio.begin();
  radio.openReadingPipe(2,pipe[2]);
  radio.startListening();
  radio.setChannel(108);
  radio.setDataRate(RF24_1MBPS);
  radio.setPALevel(RF24_PA_HIGH);
}

void loop(void) {
  if (radio.available()) 
  {

    bool done = false;

    while (!done)
    {
      done = radio.read(msg, 1);


      if (msg[0] == 111)
      {
        delay(10);
        digitalWrite(red_mos_pole, HIGH);
        Serial.println(msg[0]);
      }

      if (msg[0] == 112)
      {
        delay(10);
        digitalWrite(orange_mos_gnd, HIGH);
        Serial.println(msg[0]);
      }

      if (msg[0] == 113)
      {
        delay(10);
        digitalWrite(green_mos_gnd, HIGH);
        digitalWrite(green_mos_pole, HIGH);
        Serial.println(msg[0]);
      }

      if (msg[0] == 114)
      {
        delay(10);
        digitalWrite(red_mos_pole, LOW);
        digitalWrite(green_mos_pole, LOW);
        digitalWrite(green_mos_gnd, LOW);
        digitalWrite(orange_mos_gnd, LOW);
        Serial.println(msg[0]);
      }

    }
  }
  Serial.println("nothing else happens");
  delay(500);
}

This is all wrong

 radio.openWritingPipe(pipe[1]);
  radio.openWritingPipe(pipe[2]);
  radio.openWritingPipe(pipe[3]);

There is only one writing pipe and the third line here will have overwritten the the other 2.

It is unfortunate that examples use the variable name "pipe" for what are actually the addresses of the receivers.

If you want to send messages to 3 different receivers you need code in loop() to open the writing pipe with the address of the appropriate RX and send a message to that address. Then open the writing pipe with the next address and send the next message etc.

...R
Simple nRF24L01+ Tutorial

I didnt understand. could you show me on the code that I wrote?

hacknmake:
I didnt understand. could you show me on the code that I wrote?

Not really. It is much too far from what is required. It is not even obvious which messages are for which receiver.

If you want to send messages to three receivers you need something simple like this

for (byte n = 0; n < 3; n++) {
   radio.openWritingPipe(address[n]);
   radio.write ..... // message for address n
}

…R