Rx receive error

Hi all,
I want to use mode A uno + nrf24l01 + ds18b20 and mode B arduino nano + nrf24l01
Wireless transmission of temperature data.
However, Rx Windows can not get Temperature.
Where I have made ??mistakes?

Below is Rx_data

// receive temperature DATA and display with the serial monitor
// only slightly modified  pingpair_sleepy sketch
// from RF24 library examples bundle.
// http://maniacbug.github.com/RF24/
/*
 This program is free software; you can redistribute it and/or
 modify it under the terms of the GNU General Public License
 version 2 as published by the Free Software Foundation.
 */


#include <SPI.h>
#include "nRF24L01.h"
#include "RF24.h"
#include "printf.h"

//
// Hardware configuration
//

// Set up nRF24L01 radio on SPI bus plus pins 8 & 9

RF24 radio(8,9);

//
// Topology
//

// Radio pipe addresses for the 2 nodes to communicate.
const uint64_t pipes[2] = { 0xF0F0F0F0E1LL, 0xF0F0F0F0D2LL };

//
// Normal operation
//

void setup(void)
{
  //
  // Print preamble
  //

  Serial.begin(57600);
  printf_begin();
  printf("\n\rRF24/Rx_data/\n\r");




  //
  // Setup and configure rf radio
  //

  radio.begin();

  //
  // Open pipes to other nodes for communication
  //

  // This simple sketch opens two pipes for these two nodes to communicate
  // back and forth.
  // Open 'our' pipe for writing
  // Open the 'other' pipe for reading, in position #1 (we can have up to 5 pipes open for reading)


    radio.openWritingPipe(pipes[1]);
    radio.openReadingPipe(1,pipes[0]);

  //
  // Start listening
  //

  radio.startListening();

  //
  // Dump the configuration of the rf unit for debugging
  //

  radio.printDetails();
}

void loop(void)
{
 

  //
  //  Receive each packet, dump it out, and send it back


    // if there is data ready
    if ( radio.available() )
    {
      // Dump the payloads until we've gotten everything
      float got_data;

      bool done = false;
      while (!done)
      {
        // Fetch the payload, and see if this was the last one.
        done = radio.read( &got_data, sizeof(float) );
          

        // Spew it.  Include our time, because the ping_out millis counter is unreliable
        // due to it sleeping
       // printf("Got payload %lu @ %lu...",got_data,millis());
       Serial.print("Temperature = ");
       Serial.print(got_data);
       Serial.print(" Time:");
       Serial.print(millis());      
      }

      // First, stop listening so we can talk
      radio.stopListening();

      // Send the final one back.
      radio.write( &got_data, sizeof(unsigned long) );
      //printf("Sent response.\n\r");
      Serial.println(" Sent response.");
      // Now, resume listening so we catch the next packets.
      radio.startListening();
    }

}

below is Tx Serial Monitor

below is Rx Serial Monitor can not get temperature.

Where I have made ??mistakes?

Not posting your sending code.

sorry i forgot.
i see Tx windows seems transfer temperature
but Rx windows is no work.

below is Tx_data code

//send temperature DATA 
/* Some code is from DS18x20_Temperature sketch (PJRC) and the rest is from 
 * pingpair_sleepy sketch (RF24 library examples bundle)
 * so its probably under GPL
 */

#include <SPI.h>
#include <avr/sleep.h>
#include <avr/power.h>
#include "nRF24L01.h"
#include "RF24.h"
#include "printf.h"
#include <OneWire.h>

const short Resolution = 10; //DS18B20 Resolution 9 - 12 Bit

//
// Hardware configuration
//

// Set up nRF24L01 radio on SPI bus plus pins 8 & 9

RF24 radio(8,9);

// Set OneWire DS18B20 on pin 6

OneWire  ds(6);  // on pin 6


//
// Topology
//

// Radio pipe addresses for the 2 nodes to communicate.
const uint64_t pipes[2] = { 0xF0F0F0F0E1LL, 0xF0F0F0F0D2LL };

//
// Sleep declarations
//

typedef enum { wdt_16ms = 0, wdt_32ms, wdt_64ms, wdt_128ms, wdt_250ms, wdt_500ms, wdt_1s, wdt_2s, wdt_4s, wdt_8s } wdt_prescalar_e;

void setup_watchdog(uint8_t prescalar);
//void do_sleep(void);

const short sleep_cycles_per_transmission = 75;
volatile short sleep_cycles_remaining = sleep_cycles_per_transmission;

//
// Normal operation
//

void setup(void)
{
  //  Thermometer Resolution set (default is 12 BITS)
  
  short Sw_value ;
  switch (Resolution){
  case 9:
    Sw_value = 0x1F;
    break;
  case 10:
    Sw_value = 0x3F;
    break;
  case 11:
    Sw_value = 0x5F;
    break;
  default:
    Sw_value = 0x7F;
    break;
  }
  ds.reset();
  ds.skip();
  ds.write(0x4E);         // Write Scratchpad  
  ds.write(0x00);         // User Byte 1 (not in use)
  ds.write(0x00);         // User Byte 2 (not in use)
  ds.write(Sw_value);     // set Thermometer Resolution 
 
  //
  // Print preamble
  //

  Serial.begin(57600);
  printf_begin();
  printf("\n\rRF24/TX_data/\n\r");


  //
  // Prepare sleep parameters
  //

  // Wake up every 300s to send a Temperature  (4s*75)

    setup_watchdog(wdt_4s);

  //
  // Setup and configure rf radio
  //

  radio.begin();

  //
  // Open pipes to other nodes for communication
  //

  // This simple sketch opens two pipes for these two nodes to communicate
  // back and forth.
  // Open 'our' pipe for writing
  // Open the 'other' pipe for reading, in position #1 (we can have up to 5 pipes open for reading)


    radio.openWritingPipe(pipes[0]);
    radio.openReadingPipe(1,pipes[1]);


  //
  // Start listening
  //

  radio.startListening();

  //
  // Dump the configuration of the rf unit for debugging
  //

  radio.printDetails();
}

void loop(void)
{
  //
  // Repeatedly send the current temperature
  //

    // First, stop listening so we can talk.
    radio.stopListening();
    // Take the time, and send it.  This will block until complete
    float data;
    data = read_temper();

    Serial.print(" Time:");
    Serial.print(millis());      
    Serial.print("Now sending ");
    Serial.print(data);
    Serial.print("...");
    
    radio.write( &data, sizeof(float) );

    // Now, continue listening
    radio.startListening();

    // Wait here until we get a response, or timeout (250ms)
    unsigned long started_waiting_at = millis();
    bool timeout = false;
    while ( ! radio.available() && ! timeout )
      if (millis() - started_waiting_at > 250 )
        timeout = true;

    // Describe the results
    if ( timeout )
    {
      printf("Failed, response timed out.\n\r");
    }
    else
    {
      // Grab the response, compare, and send to debugging spew
      float got_data;
      radio.read( &got_data, sizeof(unsigned long) );

      // Spew it
    //  printf("Got response %lu, round-trip : %lu\n\r",got_data,millis());
     Serial.print("Got response ");
     Serial.println(got_data);
     }

    //
    // Shut down the system
    //

    // Experiment with some delay here to see if it has an effect
    delay(500);

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

    // Sleep the MCU.  The watchdog timer will awaken in a short while, and
    // continue execution here.
    while( sleep_cycles_remaining )
      do_sleep();

    sleep_cycles_remaining = sleep_cycles_per_transmission;
 
}

//
// Sleep helpers
//

// 0=16ms, 1=32ms,2=64ms,3=125ms,4=250ms,5=500ms
// 6=1 sec,7=2 sec, 8=4 sec, 9= 8sec

void setup_watchdog(uint8_t prescalar)
{
  prescalar = min(9,prescalar);
  uint8_t wdtcsr = prescalar & 7;
  if ( prescalar & 8 )
    wdtcsr |= _BV(WDP3);

  MCUSR &= ~_BV(WDRF);
  WDTCSR = _BV(WDCE) | _BV(WDE);
  WDTCSR = _BV(WDCE) | wdtcsr | _BV(WDIE);
}

ISR(WDT_vect)
{
  --sleep_cycles_remaining;
}

void do_sleep(void)
{
  set_sleep_mode(SLEEP_MODE_PWR_DOWN); // sleep mode is set here
  sleep_enable();

  sleep_mode();                        // System sleeps here

  sleep_disable();                     // System continues execution here when watchdog timed out
}


float read_temper()
{
  byte i;
  byte data[12];
  int sign;
  float celsius;
 
  ds.reset();
  ds.skip();
  ds.write(0x44,1);  // start conversion, with parasite power on at the end
  
  int Conv_time = 1000;
  switch (Resolution ){
  case 9 :
    Conv_time = 100;
    break;;
  case 10 :
    Conv_time = 200;
    break;  
  case 11 :
    Conv_time = 400;
    break;
  }
   delay(Conv_time);       //  Resolution to 9 BITS  conversion time 93.75ms
                          // 200 : Resolution to 10 BITS conversion time 187.5 ms
                         // 400 : Resolution to 11 BITS conversion time 375 ms
                        // 1000 : Resolution to 12 BITS conversion time 750 ms 

  // we might do a ds.depower() here, but the reset will take care of it.
  
  ds.reset();
  ds.skip();    
  ds.write(0xBE);         // Read Scratchpad

  for ( i = 0; i < 9; i++) {           // we need 9 bytes
    data[i] = ds.read();
  }
    if (OneWire::crc8(data, 8) != data[8]) {
      Serial.println("CRC is not valid!");
//    return;
  }
  // convert the data to actual temperature

  int raw = (data[1]  << 8) | data[0];

  int mask;
  switch ( Resolution){
  case 9:
    raw = raw & 0xFFF8;  // 9 bit resolution
    break;
  case 10:
    raw = raw & 0xFFFC; // 10 bit resolution
    break;
  case 11:
    raw = raw & 0xFFFE; // 11 bit resolution
    break;
  }

  celsius = (float)raw / 16.0 ;
  return celsius;
}

Is this

    float data;
    data = read_temper();

somehow easier to understand than

    float data = read_temper();

What value do get in data? Why is the variable to hold the temperature called data? What's wrong with calling is horseDrawnCarriage? Or, maybe something meaningful?

  byte data[12];

To hold two bytes?

The real question is whether you are sending good data and not interpreting it correctly, or are you sending junk and getting junk?

In my opinion what you are trying to figure out is much too complicated.

Start off with a couple of short sketches that do nothing but send a number (or a few numbers) similar to the real data you will want to send. That will make it much easier to see where the problem is.

When you know how to send and receive data you can add on the code to read sensors and whatever else is needed.

Also keep in mind that it is easier for people here to give useful advice if your code is short and single minded.

...R