Help, i need make a Network using various NRF24L01

hi, i need make a Network using various NRF24L01, one shield must act as a server, and 15 others as clients, but i’m having a lot of problems.

someone could give me some help how to solve this

What processor are you using? What library are you using? What is the issue you are having? More information will help us to help you.

ah, ok sorry, im using arduino(nano), i have libraries : RF24 and RF24-network

i need to build a system compost for an arduino nano working as a server and 15 others as clients

It would be helpful if we had a bit more specifics. What problems are you running in to specifically?

Maniacbug has a nice write-up of building a NRF24 network: RF24Network for Wireless Sensor Networking | maniacbug

look, i will send my programs:

server’s program:


#include <SPI.h>
#include <nRF24L01p.h>

nRF24L01p receiver(7,8);//CSN,CE

int iteration=0;
char * charBuf="";
int canal=90;
void setup(){
delay(150);
Serial.begin(115200);
SPI.begin();
//SPI.setClockDivider(SPI_CLOCK_DIV2);
SPI.setBitOrder(MSBFIRST);
receiver.channel(90);
receiver.TXaddress(“server1”);
receiver.RXaddress(“server2”);
receiver.init();
delay(3000);
Serial.println(“Eu sou o servidor”);
receiver.txPL(“Hi PTX. I’m ready.”);
receiver.send(SLOW);
receiver.txPL(“tell me the library’s name”);
receiver.send(SLOW);
}

void loop(){
String message="";
// if (canal == 90)
// {
// receiver.channel(89);
// canal == 89;

// }
// else
// {
// receiver.channel(90);
// canal == 90;
//}

while (receiver.available()){
message="";
receiver.read();
receiver.rxPL(message);
Serial.print(“ch90: “”);
Serial.print(message);
Serial.println(”"");

}

// Serial.print(message);
// Serial.print("");
// Serial.print(charBuf);
// Serial.println("
");
//if (message == “c1”)
// Serial.println("StringOne == “c1"”);
//if (message == “c2”)
// Serial.println("StringOne == “c2"”);

delay(2);
if(message == “c1”){
// receiver.TXaddress(“c1”);
// receiver.RXaddress(“c1”);
// receiver.init();
receiver.txPL(“c1”);
receiver.send(SLOW);
Serial.println(“recebido cliente 1”);
}else
if(message == “c2”){
// receiver.TXaddress(“c2”);
// receiver.RXaddress(“c2”);
// receiver.init();
receiver.txPL(“c2”);
receiver.send(SLOW);
Serial.println(“recebido cliente 2”);
}else
if(message == “c3”){
receiver.TXaddress(“c3”);
receiver.RXaddress(“c3”);
receiver.init();
receiver.txPL(“c3”);
receiver.send(SLOW);
Serial.println(“recebido cliente 3”);
}else
if(message == “c4”){
receiver.TXaddress(“c4”);
receiver.RXaddress(“c4”);
receiver.init();
receiver.txPL(“c4”);
receiver.send(SLOW);
Serial.println(“recebido cliente 4”);
}else
if(message == “c5”){
receiver.TXaddress(“c5”);
receiver.RXaddress(“c5”);
receiver.init();
receiver.txPL(“c5”);
receiver.send(SLOW);
Serial.println(“recebido cliente 5”);

}else
if(message == “c6”){
receiver.TXaddress(“c6”);
receiver.RXaddress(“c6”);
receiver.init();
receiver.txPL(“c6”);
receiver.send(SLOW);
Serial.println(“recebido cliente 6”);
}else
if(message == “c7”){
receiver.TXaddress(“c7”);
// receiver.RXaddress(“server”);
// receiver.init();
receiver.txPL(“c7”);
receiver.send(HIGH);
Serial.println(“recebido cliente 7”);
}else
if(message == “c8”){
receiver.TXaddress(“c8”);
receiver.RXaddress(“server”);
receiver.init();
receiver.txPL(“c8”);
receiver.send(SLOW);
Serial.println(“recebido cliente 8”);
}else
if(message == “c9”){
receiver.TXaddress(“c9”);
receiver.RXaddress(“server”);
receiver.init();
receiver.txPL(“c9”);
receiver.send(SLOW);
Serial.println(“recebido cliente 9”);
}else
if (message.length()>0){
// receiver.TXaddress(charBuf);
// receiver.RXaddress(“server”);
// receiver.init();
// receiver.txPL(“cliente errado”);
//receiver.send(SLOW);
Serial.println(charBuf);
Serial.println(“cliente errado”);
Serial.println();
message="";
}

message="";

}


client’s program:


#include <SPI.h>
#include <nRF24L01p.h>
byte STATUS_ENTRADA1 = 0;

nRF24L01p transmitter(7,8);//CSN,CE
const int buttonPin = 2; // the number of the pushbutton pin
const int ledPin = 3; // the number of the LED pin
int buttonState = 0;
String mensagem=“c1”;
String resposta;

long previousMillis = 0; // último momento que o LED foi atualizado
long interval = 500;

void setup(){

delay(150);
// Serial.begin(115200);
SPI.begin();
pinMode(ledPin, OUTPUT);
pinMode(buttonPin, INPUT);
SPI.setBitOrder(MSBFIRST);
transmitter.channel(90);
transmitter.RXaddress(“c1”);
transmitter.TXaddress(“s1”);
transmitter.init();
// Serial.println(“eu sou cliente 1”);
}

int x=0;

void loop(){
buttonState = digitalRead(buttonPin);
if ((buttonState == HIGH) & (x==0))
{
delay(200);
transmitter.txPL(mensagem);
transmitter.send(LOW);
x=1;
}

if(transmitter.available()){
transmitter.read();
transmitter.rxPL(resposta);
if (resposta==mensagem)
{
STATUS_ENTRADA1=!STATUS_ENTRADA1;
digitalWrite(ledPin, STATUS_ENTRADA1);
x=0;
}
else
{
if (millis() - previousMillis > interval) {
previousMillis = millis();
x=0;

} // lembre-se do último tempo que piscamos o LED
}

resposta="";
}
}


when there is only one arduino working,the systen works normally, but when i turn two or more , it fails,

i would like the server would monitor multi-channel and each client had respect channel.

sorry for my bad english