When running this code I get no serial output. I have also tried several other sample codes from around the internet all using the spi, mirf, and nRF24L01 libraries. When running all these codes they seem to stop when the mirf library functions have been called. For example if i call a serial print before the mirf functions it will work, but after it will not. In all cases the code compiles fine before upload. I have setup the data payload to 4 which I understand the remote calls for as well as the channel to 2 which is also what the remote is preset for. I would like to use the preloaded setup on the nordic fob if possible to keep things simpler
If i go to the examples in the mirf library and run reg_read i do get serial output which is the following
“starting wireless…”
“rf_setup= 1111”
“wireless initialized”
Any help anyone could give would be great, I’ve had good success in the past with xbee modules however haven’t had any results/experience with the nRF24l01 module and cannot figure out what I am doing wrong.
To be more specific the code i’m attempting to use is the following
In order to get the above code to compile i have to remove the adding of libraries as it was done in that post online and then import spi and mirf on my own, I’m wondering if this is where the issue is coming from. The code i finally get to compile is the following, but still no serial output.
I’m thinking now that I somehow have the mirf library incorrect or the wrong library. When i add the mirf library it adds several items mirf.h mirfspidriver.h and mirfhardwarespidriver.h but others only have mirf.h in their sample code. Is it possible i have an incorrect version or that this has something to do with it?
I too an having a problem with the Nordic +nRF24L01 module. I used it successfully with the Arduino Duemilanove but with the new Uno it hangs right at the “Mirf.init();” command, telling me it is not initializing. I am also using the code and the same Mirf.h library.
I put the client and server example program into two Arduino Duemilove’s and I am running mdfly Nordic boards, they are $7 but no 3.3V reg. so I use the FDTI 3.3V output. The ping test runs for me- I would start here to make sure there are no hardware problems.
I also have problems with nFR24L01 and Arduino Mega.
I have 2 Arduino Mega communicating to each other.
With the “old” Spi and Mirf library everything is going fine, but I have problems with the SPI in arduino 22 with the latest Mirf library.
After compiling and running there is no communication.
For de SPI and Mirf in arduino 0022 , I made de following changes in my program.
// #include <Spi.h> exclude this
// now the newer SPI is included
#include <SPI.h>
#include <Mirf.h>
#include <nRF24L01.h>
#include <MirfHardwareSpiDriver.h> // ad this
void setup(){
Mirf.csnPin = 49; */ this could be the problem with the new SPI / Mirf lib
Mirf.cePin = 48; */ this could be the problem with the new SPI / Mirf lib
/*
* Set the SPI Driver.
*/
Mirf.spi = &MirfHardwareSpi; // ad this
Mirf.init();
…………………
………………..
I did a test with the pingserver and pingclient example.
This program is running fine, but when I set
Mirf.csnPin = 49;
Mirf.cePin = 48;
in the void setup(), there is also no communication again.
I can’t ignore the setting of the csnPin and the cePin in my program, when I do this the program will hang in the communication with my GSM board.