NRF network problem (maniacbug)


I am pretty new to arduino and electronics but I managed to get 5 remote temperature sensors collection temp data and made them send it to one base node loggin all data in a db.

All this works fine BUT i can’t seem to get more than 5 nodes on the network. Normally maniacbug’s library should be able to route message to the correct base using good adressing.

This is my code for collection temp data and sending it to the receiver node:

#include <RF24Network.h>
#include <RF24.h>
#include <SPI.h>
#include <Sleep_n0m1.h> //sleep code include
#include <OneWire.h>
#include <DallasTemperature.h>

// Data wire is plugged into pin 3 on the Arduino
#define ONE_WIRE_BUS 3

// Setup a oneWire instance to communicate with any OneWire devices
OneWire oneWire(ONE_WIRE_BUS);

//Pass our OneWire reference to Dallas Temperature.
DallasTemperature sensors(&oneWire);

Sleep sleep;
unsigned long sleepTime; //how long you want the arduino to sleep

// nRF24L01(+) radio attached using Getting Started board 
RF24 radio(8,9);

// Network uses that radio
RF24Network network(radio);

//Define vars
float temp;
float vcc;
int sensorValue;

// Channel of our node
const uint16_t channel = 90;

// Address of our node
const uint16_t this_node = 05;

// Address of the other node
const uint16_t other_node = 00;

// How many packets have we sent already
unsigned long packets_sent;

// Structure of our payload, limited to 32 bytes
struct payload_t			// 32 bytes max
  unsigned long counter;  // 4 bytes
  float temp;	          // 4 bytes
  float vcc;              //4 bytes
  int sensorValue;        //4 bytes

// Prototypes
void getTemp();	     // getTemperature
void getVcc();       //Check vcc
void sendPayload();  // check if time to send payload

void setup(void)
  //ZET ADC ref op 1.1V
  // start serial port

  sleepTime = 1800000; //set sleep time in ms, max sleep time is 49.7 days - 60000 = 1 minuten
  // Min speed (for better range I presume)
  radio.setDataRate( RF24_250KBPS ) ; 
  // optionally, increase the delay between retries & # of retries 
  // optionally, reduce the payload size.  seems to improve reliability 
  network.begin(channel, this_node);

  // Power down the radio. Note that the radio will get powered back up on the next write() call.

void loop(void)
  sleep.pwrDownMode(); //set sleep mode
  sleep.sleepDelay(sleepTime); //sleep for: sleepTime

// getTemperature
void getTemp()
  Serial.print("Requesting temperatures...  Temp: ");
  delay (750); //wait for valid data
  temp = sensors.getTempCByIndex(0); // 0 refers to first IC
  Serial.print(" | ");

// GetVcc();                   					// send payload
void getVcc()
  const int num_measurements = 32;
  int sv = 0;
  int i = num_measurements;
  // read the input on analog pin 0:
  while (i--) sv += analogRead(A0);
  // Convert the analog reading (which goes from 0 - 1023) to a voltage (0 - 1.1V):
  sensorValue = sv / num_measurements;
  float voltageIN = sensorValue * (1.1 / 1023.0);
  //Moet je de waarde nog vermenigvuldigen met de waarde van de hardware voltage verdeler en je hebt de echte VOltage van de batterij.
  //beetje finetune is waarschijnlijk wel nodig. 
  vcc = voltageIN * 4.62;
  //vcc = (tempvcc * 100)/battcharged;
  //print out the value you read:
  Serial.print("Volt: ");
  Serial.print(" - ");
  Serial.print(" - ");

// sendPayload();					// send payload
void sendPayload()
  payload_t payload = { packets_sent++, temp, vcc, sensorValue };
  RF24NetworkHeader header(/*to node*/ other_node);
  bool ok = network.write(header,&payload,sizeof(payload));
  Serial.print(" Sending...");
  if (ok)
      Serial.println(" [OK]");
      Serial.println(" [FAILED]");
  // Power down the radio. Note that the radio will get powered back up on the next write() call.

Adding a second receiver node (replacing one of the 5 data collecting nodes with a receiver node) doesn’t work eather. The new 6th node fails to send data - can’t connect to the receiver)

Any idea what i am missing? I want to add one more receiving node in the network just to collect data from the more than 5 nodes and sending it through to node 00 (main receiver).

Hope you guys can help me on this. I looked on the net and couldn’t find any solution.

Got them to work; seemed to be a simple nod enumbering problem ...

I just got another weird thing going on; when numbering the node as 015 or 025 the code seems to give it another number (015 becomes 13 & 025 becomes 21); any ideas why this is happening?

The addresses are stored in Octal format.

See and

Thx TMRh20 :) now this makes sense; will have to find a way to convert that number to a OCT nr in my php savefile.