Arduino, NRF24L01 and LM35 Warning System

Hi for all,
I need advice about my intention to create one sender (LM35, nRF24L01 and nano) and one receiver (nRF24L01 and UNO, buzzer, led). Sender work OK, I test via serial monitor. I have a problem about receiver i guess. here is my codes. Please check. and fritzing files are attached. what's wrong about my project?

Transmitter code

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

const int lm35Pin = 0; 

int data[1];          


RF24 radio(9,10);  


const uint64_t pipe = 0xE8E8F0F0E1LL; .

void setup(void) { 
  Serial.begin(9600);           
  pinMode (lm35Pin, INPUT);     
  radio.begin();               
  radio.openWritingPipe(pipe);  

}

void loop(void) {// 
  data [0] = analogRead(lm35Pin);   
  Serial.println(data [0]);         
  radio.write(data, sizeof(data));  
}

Receiver code

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

#define buzzerPin 2   
#define threshold 90  

int led1 = 4;         

int data[1];          


RF24 radio (9,10);   


const uint64_t pipe = 0xE8E8F0F0E1LL;  

void setup() {
  pinMode(led1, OUTPUT);          
  Serial.begin(9600);             
  radio.begin();                 
  radio.openReadingPipe(1, pipe); 
  radio.startListening();

}

void loop() {
  if (radio.available () ) {         
    radio.read(data, sizeof(data));  
    Serial.println(data[0]);         

    if(data[0] > threshold) {       
      tone(buzzerPin, 440);         
      digitalWrite (led1, HIGH);    
      delay(400);
      noTone(buzzerPin);
      digitalWrite(led1, LOW);
      delay(50);
    }
    else {                        
      noTone (buzzerPin);        
      digitalWrite(led1, LOW);    
    }
  }
    }

You can't say that a wireless sender is OK unless the receiver is getting the correct message.

Have a look at this Simple nRF24L01+ Tutorial.

The examples are as simple as I could make them and they have worked for other Forum members. If you get stuck it will be easier to help with code that I am familiar with. Start by getting the first example to work

Wireless problems can be very difficult to debug so get the wireless part working on its own before you start adding any other features.

...R

thanks, i'll try. i hope it works.

tugceko:
thanks, i'll try. i hope it works.

If you follow the instructions it will.

...R

than you very much. it works perfectly. i changed the library as you wrote and bought a new module. it turned out my receiver module was broken. thanks again.

Thanks for the feedback.

...R

hi. can you look my other project please if i don't bother you: Wireless Temperature and Humidity Measurement with Arduino LCD Display - Displays - Arduino Forum

tugceko:
hi. can you look my other project please if i don't bother you:

I don't read the Displays section of the Forum and if your problem is about an LCD then I can't help.

...R

I also create a topic on display section but i think it's about nrf because even if i test the nrf24's it couldn't send tha data. but the modules are ok.

I have a feeling you are mixing up commands from another library that are not part of the TMRh20 library - for example transmitter.txPL()

...R