Could one of you luminescent individuals tell me what is wrong on the fourth line of the loop (starts with var=radio)? I'm getting the error of "void value not ignored as it should be." I downloaded this (unaltered) from the internet, but it has a problem. I've tried to understand the problem and work it out, but I'm just too unskilled. Thanks for any input.
void setup() {
Serial.begin(9600);
radio.begin();
radio.openReadingPipe(1,Pipe);
radio.startListening();
pinMode (7,OUTPUT);
// put your setup code here, to run once:
13 posts and you still don't use code tags when posting code? Time to read the sticky post at the top of the forum and up your game. It will help people help you.
Hello newbee,
you are welcome. To remain sympathetic for all users here.
Follow this link to get an instruction how to write a good first posting in just one minute
or an even impressive first posting in just 10 minutes
Looks to me like they were using a different NRF24 library to you. Or maybe they just didn't care about the compiler warning (I think it's only a waning not an error).
It would help if you provided links to where you got the original sample from, and which NRF24 library you are using.
Wireless problems can be very difficult to debug so get the wireless part working on its own before you start adding any other features.
The examples are as simple as I could make them and they have worked for other Forum members. If you get stuck it will be easier to help with code that I am familiar with. Start by getting the first example to work
There is also a connection test program to check that the Arduino can talk to the nRF24 it is connected to.
A common problem with nRF24 modules is insufficient 3.3v current from the Arduino 3.3v pin. This seems to be a particular problem with the nano. The high-power nRF24s (with the external antenna) will definitely need an external power supply. At least for testing try powering the nRF24 with a pair of AA alkaline cells (3v) with the battery GND connected to the Arduino GND.
If you are using the high-power nRF24s (with the external antenna) make sure there is sufficient distance between the two nRF24s so that the signal does not overwhelm the receiver - try 3 metres separation. If you are new to nRF24s it may be better to start with a pair of low power modules with the pcb antenna.
Thank you guys for your replies. Gfvalvo, thanks for your question. I cannot answer it because IDE will not upload the code to the nano with an error in it. Robin2, thanks for your suggestion. I have read your article, seveal times. And now again. I will try to gain some more understanding before bothering you guys again.
chief400:
Gfvalvo, thanks for your question. I cannot answer it because IDE will not upload the code to the nano with an error in it.
That's irrelevant. Just open the appropriate library file and find the prototype(s) for the read() function. That will tell you the data type returned.