Arduino nano with nrf24L01 using RF24Network

Hello all,

I am very new to Arduino. Presently, I am working on a project where I plan to use Arduino nano with nRF24L01. I am using RF24Network library from TMRH20.

My project is as follows:

Network:

00 (base)
|
|/
01(node 01)

Description:

  1. In the network there is two nodes 00 and 01.

  2. Every time When I high the Pin2 of 00 then Pin8 of 01 will high. Pin8 of 01 will remain high until receive the off command from base ( node 00).

  3. Every time When I high the Pin3 of 00 then Pin8 of 01 will be low.

  4. One led is connected with Pin8 of 01 for indication.

Problem:

The led operate fine for first time. But second time the led is not on when I high Pin2 of 00. I have also found a very strange behaviour. Suppose I high the Pin2 of 00, led connected with 01 is not on. When I open “Serial Monitor” to see the message, suddenly I found led was on. Same thing happen when I high Pin3 of 00, led was not off. But when I reopen “Serial Monitor” suddenly led was off.

There is something wrong in my programme. I need guidance to solve the problem. I have attached the code for 00 and 01.

base0.ino (3.88 KB)

node01.ino (2.48 KB)

void loop(void){
  
  update();//Network update    
  // while ( network.available() )  {   
   // network.peek(header);           
   read();
   
  //
  }

    write(); 
}

Get your delete key fixed. The commented out code is NOT part of the problem. DO NOT POST COMMENTED OUT CODE.

You commented out the open curly brace, but not the close one, so that code won’t even compile.

Put EVERY { on a line BY ITSELF.
Put EVERY } on a line BY ITSELF.
Use Tools + Auto Format AND make sure your code compiles BEFORE you post again.