my nRF24 pressure sensor have issue cannot receive data from transmiter

Hi

Analog pressure cannot accept data from the sender. I use Arduino Uno and I will use 2 analog pressure sensors, I use modul nRF24L01 .
Whether the code below is correct or wrong.
Please help for the correct code

Transmiter 1 :

#include <SPI.h>
#include <nRF24L01.h>
#include <RF24.h>
#define pot_pin A0

RF24 radio(9,10);
const uint64_t pipes[3] = { 0xF0F0F0F0E1LL, 0xF0F0F0F0E2LL, 0xF0F0F0F0E3LL };

void setup() {
Serial.begin(9600);
pinMode(pot_pin,INPUT);
radio.begin ();
radio.setDataRate(RF24_1MBPS);
radio.setChannel(35);
radio.setPALevel(RF24_PA_MIN);
radio.openReadingPipe(1, pipes[1]);
}

void loop() {

radio.stopListening ();

int value = analogRead(pot_pin);
float voltage = (value5.0)/1024.0;
float pressure_pascal = (3.0
((float)voltage-0.47))1000000.0;
float pressure_bar = pressure_pascal/10e5;
float pressure_psi=pressure_bar
14.5038;
radio.write(&pressure_bar, sizeof(pressure_bar));
Serial.print("Transmitting Data : ");
Serial.println(pressure_bar);
delay(50);
}

=================================================================

Receiver :

#include <SPI.h>
#include <nRF24L01.h>
#include <RF24.h>
#define buzzerPin 2
#define threshold 6
#define led_pin 3
#include <Wire.h>
#include <LiquidCrystal_PCF8574.h>

LiquidCrystal_PCF8574 lcd(0x27);

RF24 radio(9,10);

const uint64_t pipes[3] = { 0xF0F0F0F0E1LL, 0xF0F0F0F0E2LL, 0xF0F0F0F0E3LL };

void setup() {
// put your setup code here, to run once:

Serial.begin(9600);
radio.begin();
radio.setDataRate(RF24_1MBPS);
radio.setChannel(35);
radio.setPALevel(RF24_PA_MIN);
radio.openReadingPipe(1, pipes[1]);
radio.openReadingPipe(2, pipes[2]);

// radio.startListening();
}

void loop() {
// put your main code here, to run repeatedly:

radio.startListening();

if (radio.available())
{
while (radio.available())
{

int value = 0 ;
float voltage = (value5.0)/1024.0;
float pressure_pascal = (3.0
((float)voltage-0.47))1000000.0;
float pressure_bar = pressure_pascal/10e5;
float pressure_psi=pressure_bar
14.5038;
radio.read(&pressure_bar, sizeof(pressure_bar));

Serial.print("Received Data : ");

Serial.println(pressure_bar);
lcd.begin(16,2);
lcd.setBacklight(255);
lcd.clear();
lcd.setCursor(0,0);
lcd.print(“Pressure:”);
lcd.print(pressure_bar);
lcd.print("Bar ");
delay(1000);

if(pressure_bar < threshold){
delay(50);
lcd.clear();
lcd.setCursor(0,0);
lcd.print(“Pressure low”);
lcd.setCursor(0,1);
lcd.print(“Check Tank”);
delay(500);
tone(buzzerPin, 440);
digitalWrite(led_pin, HIGH);
delay(400);
noTone(buzzerPin);
digitalWrite(led_pin, LOW);
delay(50);
}
else {
noTone(buzzerPin);
digitalWrite(led_pin, LOW);
lcd.setCursor(0,1);
lcd.print(“Pressure Normal”);
delay(1000);
}
}
}
}

Thank You

Regards

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

There is also a connection test program to check that the Arduino can talk to the nRF24 it is connected to.

A common problem with nRF24 modules is insufficient 3.3v current from the Arduino 3.3v pin. The high-power nRF24s (with the external antenna) will definitely need an external power supply. At least for testing try powering the nRF24 with a pair of AA alkaline cells (3v) with the battery GND connected to the Arduino GND.

...R

Thank You Robin2..