Hi everyone,
I recently want to test the function of my Nrf24L01 board
However, it does not work as expected
if I write the program like this, it will shows"error: void value not ignored as it ought to be(at the "done = radio.read( data, sizeof(data) );" part)"
Program(Receiving):
Your topic was MOVED to its current forum category which is more appropriate than the original as it has nothing to do with Installation and Troubleshooting of the IDE
The prototype of the read method is void read(void* buf, uint8_t len);. So it does not return a value. You however assign the non-existing return value to the variable done
I did know it already
so I did change something
However, it cannot receive anything but spamming "No radio available", which I was set to print if there is no signal received
Arduino: 1.8.13 (Windows 10), Board: "Arduino Uno"
C:\Users\20191432\Desktop\IDK\IDK.ino: In function 'void loop()':
IDK:33:45: error: void value not ignored as it ought to be
done = radio.read( data, sizeof(data) );
^
exit status 1
void value not ignored as it ought to be
This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.