Good morning everyone, I had this sketch that worked now when loading the program gives me an error:

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

float Irms ;
RF24 radio(9, 10);
const uint64_t pipe = 0xE8E8F0F0E1LL;

void setup(void) {

  radio.openReadingPipe(1, pipe);
  Serial.println("setup() - Inizializzazione completata");

void loop(void) {
  if ( radio.available() )
    bool done = false;
    while (!done)

      done = radio.read(&Irms, sizeof(float));
  • 1
    BTW, be careful as while loop is infinite (there is only delay(1000) and done never changes)
    – KIIV
    Commented May 19 at 9:42

1 Answer 1


This statement:

done = radio.read(&Irms, sizeof(float));

is not compatible with the current <RF24.h> library.

The read() method now has this signature:

void read (void *buf, uint8_t len)

You can either adapt your code or use the ancient "maniacbug" library https://github.com/maniacbug/RF24 which has the following signature for read():

bool read( void* buf, uint8_t len );

  • Can you help me modify my code? Thanks
    – ksalva
    Commented May 19 at 9:52
  • @ksalva Your code in the question appears to be truncated. Show your entire code and I will attempt to suggest a fix and add it into the answer.
    – 6v6gt
    Commented May 19 at 9:56

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.