Help Please!!! Can someone tell me what's wrong with my NRF24l01 code

I'm trying to make a network of interconnected sensors but I can't figure out the code for the NRF24l01.
What I was trying to do in this example is make the transmitter send a message to the receiver when the sensor is triggered. When the receiver gets the message, it will light an Led.

Transmitter

#include  <SPI.h>

#include "nRF24L01.h"
#include "RF24.h"
int sensor = 7;              // the pin that the sensor is atteched to
int state = LOW;             // by default, no motion detected
int val = 0;                 // variable to store the sensor status (value)
int msg[1];
RF24 radio(9,10);
const uint64_t pipe = 0xE8E8F0F0E1LL;

void setup(void){
 Serial.begin(9600);
 radio.begin();
 radio.openWritingPipe(pipe);
 pinMode(sensor, INPUT);
 }
 
 
 void loop(void){
   val = digitalRead(sensor);
   if (val == HIGH){
 msg[0] = 111;
 radio.write(msg, 1);}
}

Receiver

#include <SPI.h>

#include "nRF24L01.h"
#include "RF24.h"
int msg[1];
RF24 radio(9,10);
const uint64_t pipe = 0xE8E8F0F0E1LL;
int LED1 = 3;

void setup(void){
 Serial.begin(9600);
 radio.begin();
 radio.openReadingPipe(1,pipe);
 radio.startListening();
 pinMode(LED1, OUTPUT);}
 
 void loop(void){
 if (radio.available()){
   bool done = false;    
   while (!done){
     done = radio.read(msg, 1);      
     Serial.println(msg[0]);
     if (msg[0] == 111){delay(10);digitalWrite(LED1, HIGH);}
     else {digitalWrite(LED1, LOW);}
     delay(10);}}
 else{Serial.println("No radio available");
 }
 }

Have a look at this Simple nRF24L01+ Tutorial.

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

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

...R