How to code transmitter in single arduino using nrf24l01

Hi,i would ask how to code both transmit and receive data using one arduino with nrf module Receive data from Sensor and after that trasmit the data to another nodes

thanks

This Simple nRF24L01+ Tutorial should have what you need.

...R

My project is to make Wireless Sensor Network Sistem,the system that i wanted like the image above
So far,i can connecting 2 sensor (DHT11+NRF24L01+ARDUINO) with multiple nodes to receiver node
in that image sensor shown by 021 and receiver node by 01

but i’m stuck when try to continue code receiver node 01 to 00 (sink node)
i still troubled by how to make sink node that controlling 01 etc and show the data that 01 receive from 021

7015275513_73663f8a74.jpg

#include <RF24Network.h>
#include <RF24.h>
#include <SPI.h>
#include <DHT.h>

#define DHTTYPE DHT11   // DHT 11
#define DHTPIN A0     //Pin apa yang digunakan

RF24 radio(9,10);                    // nRF24L01(+) radio attached using Getting Started board 
RF24Network network(radio);          // Network uses that radio

const uint16_t Grandchild = 031;        // Address of our node in Octal format
const uint16_t child = 01;       // Address of the other node in Octal format

float t1;
float h1;
DHT dht(DHTPIN, DHTTYPE);

struct payload{
  float temp;
  float hum;
};

void setup()
{
  Serial.begin(57600);
  SPI.begin();
  radio.begin();
  network.begin(100,Grandchild );
  dht.begin();
}

void loop() {
network.update();                         
delay(2000);
Serial.println("Sending...");
t1 = (float) dht.readTemperature();
h1 = (float) dht.readHumidity();
payload data = {t1,h1};
RF24NetworkHeader header(child);
network.write(header,&data,sizeof(data)); 

Serial.print("Temp2: ");
Serial.println(t1);
Serial.print("Humidity2: ");
Serial.println(h1);
}
#include <RF24Network.h>
#include <RF24.h>
#include <SPI.h>

RF24 radio(9,10);
RF24Network network(radio);

const uint16_t child = 01;  


float t,h;
float t1,h1;

struct payload{
  float temp;
  float hum;
};

void setup()
{
  Serial.begin(57600);
  SPI.begin();
  radio.begin();
  network.begin(100,child);
}

void loop() {
network.update();                         

while(network.available()){
  
  RF24NetworkHeader header;
  payload dataREV;
network.read(header,&dataREV,sizeof(dataREV)); 
t = dataREV.temp;
h = dataREV.hum;
Serial.println("Master receive from children 021 ");
Serial.print("Temp: ");
Serial.println(t);
Serial.print("Humidity: ");
Serial.println(h);
delay(1000);

t1 = dataREV.temp;
h1 = dataREV.hum;
Serial.println("Master receive from children 031 ");
Serial.print("Temp2: ");
Serial.println(t1);
Serial.print("Humidity2: ");
Serial.println(h1);
delay(1000);

}
}

Image from Reply #2 so we don’t have to download it. See this Image Guide

5e38a1b6ab14bb349004402968cde5f672850523.jpg

…R

I have no experience of the RF24 network library. Sorry.

...R