Radio Communication help

Hi, I’m very new to this so please keep it simple to understand thanks.

I’m trying to write a code that will let two OUN boards communicate with one OUN board by NRF2401.
I have the code working without the “wireless” part but I’m not sure how to modify the code to let each board talk or listen when they should.

So my project is to have two slave connected to 5 IR senors each. When the senors are blocked the message is sent and the master board that will turn on 5 LED lights. The radio range is somewhere around 30ft outside.

i would like help understanding what i need to make this communication work, Radio code is red, work LED senor Code in blue.

Here are some of my question
I know i need addresses for the message to come through do i need three? one for each board?
is this the library i should use?? i Google then Downloaded it??
what dose the master board need to know, what should the slaves know or dose everyone get the same code?

[color=red]* Library: TMRh20/RF24,
#include <SPI.h>
#include <nRF24L01.h>
#include <RF24.h>
#define led 12
RF24 radio(7, 8); // CE, CSN
const byte addresses[][6] = {"00001", "00002"};

void setup() {
  radio.openWritingPipe(addresses[1]); // 00002
  radio.openReadingPipe(1, addresses[0]); // 00001
[color=blue]int FullSensor = A0;//full sensor- blk=vcc,Blu=Gr,Brn=5v
int EmptySensor = A1;//Empty Sensor 
int ledA = 8;   //led lights for full
int ledB = 9;  //led lights for empty
int ledP = 13;   // power light

void setup() {
  pinMode(FullSensor, INPUT);
  pinMode(EmptySensor, INPUT);
  pinMode(ledA, OUTPUT);

void loop(){
digitalWrite(ledP, HIGH);  // Power light stay on the whole time

if (digitalRead(FullSensor) == HIGH){   // full sensor bin
 digitalWrite(ledA, LOW);
  digitalWrite(ledA, HIGH);}  // end of full sensor bin

if (digitalRead(EmptySensor) == HIGH){  // Empty Sensor bin
 digitalWrite(ledB, LOW);
  digitalWrite(ledB, HIGH);}   // End of Empty Sensor bin
  delay(2000);  // read sensor every 2 sec


Thank you for the help, it will be greatly appreciated. is Robin2's simple rf24 tutorial. It may help you to understand those radios.

Hi, Welcome to the forum.

Please read the first post in any forum entitled how to use this forum.,148850.0.html . Then look down to item #7 about how to post your code. It will be formatted in a scrolling window that makes it easier to read.

Thanks.. Tom... :)