Help transmit data with nrf24l01

Hi,

i had a problem with sending data from arduino nrf24l01 to my raspberry pi.

i am trying to send the data which is capturing my flow meter to my raspberry pi.

The serial print is correct but arduino is not sending the data over to my raspberry pi.

Below is the code.

#include <SPI.h>
#include “nRF24L01.h”
#include “RF24.h”
#include “printf.h”

//Flow Meter
byte statusLed = 13;

byte sensorInterrupt = 0; // 0 = digital pin 2
byte sensorPin = 2;

float calibrationFactor = 4.5;
volatile byte pulseCount;

float flowRate;

unsigned int flowML;
unsigned long totalML;
unsigned long oldTime;
unsigned long rxTimer,startTime, stopTime, payloads = 0;
volatile unsigned long counter;

// NRF24L01
// Set up nRF24L01 radio on SPI pin for CE, CSN
RF24 radio(7,8);
unsigned long timeoutPeriod = 3000;
// Example below using pipe5 for writing
const uint64_t pipes[2] = { 0xABCDABCD71LL, 0x544d52687CLL };

char receivePayload[32];

void pulseCounter()
{
// Increment the pulse counter
pulseCount++;
}

void setup() {
Serial.begin(57600);
printf_begin();

//CONFIGURE FLOW METER
pinMode(statusLed, OUTPUT);
digitalWrite(statusLed, HIGH); // We have an active-low LED attached

pinMode(sensorPin, INPUT);
digitalWrite(sensorPin, HIGH);

pulseCount = 0;
flowRate = 0.0;
flowML = 0;
totalML = 0;
oldTime = 0;

attachInterrupt(sensorInterrupt, pulseCounter, FALLING);

//CONFIGURE RADIO
radio.begin(); // Setup and configure rf radio
radio.setChannel(1); // Set the channel
radio.setPALevel(RF24_PA_HIGH);
radio.setDataRate(RF24_250KBPS);
radio.setAutoAck(1); // Ensure autoACK is enabled
radio.setRetries(2,15); // Optionally, increase the delay between retries. Want the number of auto-retries as high as possible (15)
radio.setCRCLength(RF24_CRC_16); // Set CRC length to 16-bit to ensure quality of data
radio.openWritingPipe(0x544d52687CLL); // Open pipe for writing

}

void readmeter() {

if((millis() - oldTime) > 1000) // Only process counters once per second
{

detachInterrupt(sensorInterrupt);

flowRate = ((1000.0 / (millis() - oldTime)) * pulseCount) / calibrationFactor;

oldTime = millis();

flowMilliLitres = (flowRate / 60) * 1000;

totalML += flowML;

unsigned int frac;

// Print the flow rate for this second in litres / minute
Serial.print(“F: “);
Serial.print(int(flowRate)); // Print the integer part of the variable
Serial.print(”.”); // Print the decimal point
// Determine the fractional part. The 10 multiplier gives us 1 decimal place.
frac = (flowRate - int(flowRate)) * 10;
Serial.print(frac, DEC) ; // Print the fractional part of the variable
Serial.print(“L/min”);
// Print the number of litres flowed in this second
Serial.print(" C: "); // Output separator
Serial.print(flowMilliLitres);
Serial.print(“mL/Sec”);

// Print the cumulative total of litres flowed since starting
Serial.print(" O: "); // Output separator
Serial.print(totalMilliLitres);
Serial.println(“mL”);

// Reset the pulse counter so we can start incrementing again
pulseCount = 0;

// Enable the interrupt again now that we’ve finished sending output
attachInterrupt(sensorInterrupt, pulseCounter, FALLING);
}
}
byte data[210] = {"_F: 0.0L/min C: 0mL/Sec O: 0mL"};

void loop() {

readmeter();
sendOverRadio();

}

void sendOverRadio() {
//power on radio
radio.powerUp();

//prepare

unsigned long cycles = 1000;
unsigned long transferCMD = {‘H’,‘S’,cycles }; // Indicate to the other radio that we are starting, and provide the number of payloads that will be sent
radio.writeFast(&transferCMD,12); // Send the transfer command
if(radio.txStandBy(timeoutPeriod)){ // If transfer initiation was successful, do the following

startTime = millis(); // For calculating transfer rate
boolean timedOut = 0; // Boolean for keeping track of failures
for(int i=0; i<cycles; i++){ // Loop through a number of cycles

data[0] = i; // Change the first byte of the payload for identification
if(!radio.writeBlocking(&data,32,timeoutPeriod)){ // If retries are failing and the user defined timeout is exceeded
timedOut = 1; // Indicate failure
counter = cycles; // Set the fail count to maximum
break; // Break out of the for loop

}
}
}

stopTime = millis(); // Capture the time of completion or failure
// Stop listening and write to radio
radio.stopListening();

// Send to hub
radio.write(data, sizeof(&data));
}