PIR wireless to LCD; need programming help.

Hello: I need some help programming this project. I am attempting to have a PIR in my yard that, when triggered, sends a message to an LCD inside my house. However I’m missing something in the sketches. Physically, I have the PIR and a NFR24f01 wired to a nano. The Lcd and the other transceiver are wired to a Uno. Both transceivers have a 3.3 V regulator attached. I have wired the transceivers exactly like the green diagrams on the Tutorial page about them. The project at this time is just 3 feet apart. I am having difficulty getting it to work. Two questions please:

  1. In the transmit code, I put an LED in the circuit that will blink when the PIR is triggered. This is just for test purposes. However, it blinks once then the program won’t loop. Can’t see why.

  2. Nothing is received on the LCD or serial monitor. I can’t see what is wrong.

I am a rookie. Any help would be appreciated.

Transmit Code

//TRANSMITTER

#include <SPI.h>                    //libraries
#include <nRF24L01.h>
#include <RF24.h>

int led = 3;                       
int sensor = 8; //The PIR pin     
int val = 0;
const byte address[6] = "00001";         //byte array 
RF24 radio(9, 10);                       //ce csn
const uint64_t pipe = 0xE8E8F0F0E1LL;    //define the transmit pipe

void setup(void) {
  Serial.begin(9600);
  pinMode(sensor, INPUT);   
  pinMode(led, OUTPUT);                  
  radio.begin();                         //begin transmitter                        
  radio.setPALevel(RF24_PA_MAX);          //set level
  radio.openWritingPipe(address);
  radio.stopListening();
}

void loop(void){
  

   
   val = digitalRead(sensor);                // read sensor value
  
   if (val == HIGH) {                          //if triggered send alert

   digitalWrite(led, HIGH);                     // turn on led -to test PIR
   delay(500);  
   digitalWrite(led, LOW);
   
   const char text[] = ("Intruder Alert");        //The alert
   radio.write(&text, sizeof(text));            // send the message
     
   delay(8000);                                  //wait for reset-  

  }}

Receive code

[//RECEIVER
//code to recieve message if PIR triggered using NF240L01

#include <nRF24L01.h>
#include <printf.h>
#include <RF24.h>
#include <nRF24L01.h>
#include <RF24_config.h>


#include <SPI.h>                      
#include <NRF24L01.h>
#include <RF24.h>
#include <LiquidCrystal.h>     
LiquidCrystal lcd(7, 8, 2, 3, 4, 5);
 // initialize the library with the numbers of the interface pins;  RS  E  D4 D5  D6 D7
const byte address[6] = "00001";  
RF24 radio(9, 10); // CE,CSN

const uint64_t pipe = 0xE8E8F0F0E1LL;            //const byte address[6] = "00001";

void setup() {
  Serial.begin(9600);
  //radio.begin();
 // radio.openReadingPipe(0,  address);
 // radio.setPALevel(RF24_PA_MAX);
 // radio.startListening();

  lcd.begin(16, 2);
  lcd.setCursor(0, 1);
 //lcd.noDisplay();       //LCD off when no message.  
  
}
void loop() {
  
  if (radio.available()) {
    lcd.display();               //Turn LCD on 
    delay (100);  
   char text[15] = "text";
   radio.read(&text, sizeof(text));
   Serial.println(text);
    lcd.print("text");
            
    
    delay (8000);               //stay on for 8 seconds
  }  }/code]

You are trying to do too much at once, and are not sure what works, and what doesn't. Put the PIR and the LCD and the LED away, for now.

Get the transmitter to send, once a second, "Yo". Get the receiver to receive that, and print "There" to the serial monitor. No sense trying to do anything with the data received until you know you are receiving data. No sense trying to send anything fancy until you know that the radios are working.

   const char text[] = ("Intruder Alert");        //The alert

(Why) (is) (the) (string) (in) (parentheses) (?)

Format your code properly. ONE { per line, with NOTHING else. ONE } per line, with NOTHING else.

   delay(8000);                                  //wait for reset-

Get- rid- of- the- useless- comments-, especially when they are wrong.

  //radio.begin();
 // radio.openReadingPipe(0,  address);
 // radio.setPALevel(RF24_PA_MAX);
 // radio.startListening();

Plug the radio in, but leave it turned off, and not in receive mode, and wonder why you don't receive anything. Well, I have a clue...

PaulS:
You are trying to do too much at once, and are not sure what works, and what doesn’t. Put the PIR and the LCD and the LED away, for now.

Get the transmitter to send, once a second, “Yo”. Get the receiver to receive that, and print “There” to the serial monitor. No sense trying to do anything with the data received until you know you are receiving data. No sense trying to send anything fancy until you know that the radios are working.

   const char text[] = ("Intruder Alert");        //The alert

(Why) (is) (the) (string) (in) (parentheses) (?)

Format your code properly. ONE { per line, with NOTHING else. ONE } per line, with NOTHING else.

   delay(8000);                                  //wait for reset-

Get- rid- of- the- useless- comments-, especially when they are wrong.

  //radio.begin();

// radio.openReadingPipe(0,  address);
// radio.setPALevel(RF24_PA_MAX);
// radio.startListening();



Plug the radio in, but leave it turned off, and not in receive mode, and wonder why you don't receive anything. Well, I have a clue...

Paul,
Thank you for your help.
As you see, I’m a newbie. If you don’t wish to help, then don’t. Why insult me? It must be an American thing.
I will go somewhere else.

Shootout:
I will go somewhere else.

Trouble is, there is no "somewhere else". Well, there's stackexchnage, which is just as bad, in a different way. And that's how folk on this site get away with their rude insulting spiteful behaviour: those in need are a captive market with little chance of getting help anywhere else.