I am facing this problem in nRF24L01 receiver
#include <SPI.h>
#include “RF24.h”
#include “printf.h”
#include “RF24_config.h”
#include “nRF24L01.h”
#define RF_CS 9
#define RF_CSN 10
RF24 radio(RF_CS, RF_CSN);
const uint64_t pipes[2] = { 0xe7e7e7e7e7LL, 0xc2c2c2c2c2LL };
struct sensor_struct{
int sensor_id;
float temp;
float soil_temp;
float humid;
float pres;
};
void setup() {
Serial.begin(9600);
printf_begin();
radio.begin();
radio.openWritingPipe(pipes[1]); // note that our pipes are the same above, but that
radio.openReadingPipe(1, pipes[0]); // they are flipped between rx and tx sides.
radio.startListening();
radio.printDetails();
}
void loop() {
if (radio.available()) {
Serial.println("--------------------------------------------------------------------------------");
uint8_t rx_data[32]; // we’ll receive a 32 byte packet
bool done = false;
while (!done) {
done = radio.read( &rx_data, sizeof(rx_data) );////problem here only
printf(“Got payload @ %lu…\r\n”, millis());
}
// echo it back real fast
radio.stopListening();
radio.write( &rx_data, sizeof(rx_data) );
Serial.println(“Sent response.”);
radio.startListening();
// do stuff with the data we got.
Serial.print("First Value: ");
Serial.println(rx_data[0]);
}
}
problem in :38th line
thanks in advance
Arduino: 1.6.1 (Windows 8.1), Board: “Arduino Uno”
pro_micro_receive_nrf24l01.ino: In function ‘void loop()’:
pro_micro_receive_nrf24l01.ino:38:12: error: void value not ignored as it ought to be
Error compiling.
This report would have more information with
“Show verbose output during compilation”
enabled in File > Preferences.