#include <nRF24L01.h>
#include <printf.h>
#include <RF24.h>
#include <RF24_config.h>
const int pinCE = 9;
const int pinCSN = 10;
RF24 radio(pinCE, pinCSN);
// Single radio pipe address for the 2 nodes to communicate.
const uint64_t pipe = 0xE8E8F0F0E1LL;
char data[16];
void setup(void)
{
Serial.begin(9600);
radio.begin();
radio.openReadingPipe(1,pipe);
radio.startListening();
}
void loop(void)
{
if (radio.available())
{
int done = radio.read(data, sizeof data);
Serial.println(data);
}
It seems that the read() function return a value
Which RF24 library are you using ?
Where did you download it from or did you install it via the IDE
Exact details would be handy please
In the meantime simply remove the "int done =" that precedes the use of the read() function. Does the code compile now ?
Do any of the examples with the library use a variable to hold the value returned by the read() function ?
Despite your useless library specification, the error shows that your code is designed for a different library.
You should throw away change the demo code for the old ManicBug library then.
The return value that does not exist is not used anyway.