I have two Arduino (a mega and nano) and two nRF24L01 + to communicate them.
The connection of the wires according to the library and using the SPI pins modeled on arduino.
MISO -> 12
MOSI -> 11
SCK -> 13
CE -> 8
CSN -> 7
GND -> GND
VCC -> 3.3v
MISO -> 50
MOSI -> 51
SCK -> 52
CE -> 8
CSN -> 7
GND -> GND
VCC -> 3.3v
Use the library "Mirf" found in the playground (Arduino Playground - HomePage) and the examples ping_server and ping_client (without changing anything).
The problem is that the communication fails. If I connect the nano as a server and a mega as a client, mega sends the message to the nano, it receives and sends the replay although but mega not receives and displays a timeout.
If I do the contrary, the mega as a server and nano as a client, the nano sends the message and the mega does nothing.
At the time I thought of any of the Nrf24L01 + bad but I have exchanged and error remains the same so it is clear that the problem has to be in the mega arduino that is unable to receive any message.
And after that summarize, someone has managed to use an arduino Nrf24L01+ with and mega with the library "Mirf" or with another library.
Sorry for my English.
I’ve been trying for several days I have not managed to find the problem.
The only thing I have noticed is that whenever Mirf.dataReady (), I return “false” in the arduino mega whatever you do.
In contrast with the arduino nano, as you receive a message is changed to “true”.
Again I think it may be some error in the library Mirf of aaronds as in the old forum I have seen some message with a code that if it worked but using the arduino IDE mega 18 and 1280.
I need someone with a mega arduino (2560) and the module would confirm whether it works or code used.
I still have the same problem and I hope someone comes up with something and I can advise how to fix it.
As much as I've tried changing the library and how to connect there is no way to work with my arduino mega 2560.
Thanks in advance.
MISO → 12
MOSI → 11
SCK → 13
Note that the pin numbers are not in order.
MISO → 50
MOSI → 51
SCK → 52
Note that the pin numbers are in order.
Are the connections on the Mega correct?
The pins are correct according to information from SPI pins of Arduino Mega (http://arduino.cc/en/Main/ArduinoBoardMega2560) and Arduino Nano (http://arduino.cc/en/Main/ArduinoBoardNano) according to the web.
Also I used the eagle design module to connect.
The only error is the reception of communications in the Arduino Mega and if it is able to send messages correctly.
With the arduino nano no problem because it receives and sends correctly.
I still think it may be a bug in the library or incompatibility with the atmega 2560.
Had the same problem using the resistors / voltage dividers! If you connect the nrf2410 direct to the mega 2560 problem seems to be fixed. The fault seems to be on pin 5 SCK when you use resistors / voltage dividers!
I know this is an old thread so I don't know if anyone is still watching this or if the OP is waiting for an answer any longer, however in the interest of someone else looking for a solutions here is whatI have and is working.
This is using the RF24 library using the nRF24L01+ and the Arduino Mega2560
Line Arduino Pin
Code for radio pins in the sketch is:
Also, just because, this is for the UNO with the same setup
Line Arduino Pin
Hope this helps someone.
The power supply on the megas can mess up this module. Try adding a large capacitor (>1uf) across 3.3v and ground
Mega2560 and Mini pro, 2x nRF24l01+. Library 24_master, example "Getting Started"
Mega sending packets, mini receives it. Mini sent echo reply, mega receives nothing.
both controllers can query RF modules successfully. RF Module swap does not help.
I do confirm that 10mkF capacitor between ground and +3 at Mega side solved the issue.
In Mega I used pin 50,51,52 as MISO, MOSI, SCK. I disabled all serial and activated the LED(pin 13) as an indicator.
Hope this will help you.
Same issues here too.
After changing the pinning for the mega (Funduino in my case) still not working. Installed a small psu on breadboard and took power from there and it all worked.
Thanks all for the tips, this was driving me nuts.
I to had a lot of issues.... But fixed it.
The problem is with the 3.3V power supply on the Arduino's. Either use an external 3.3V power supply or use a big ass cap and a decoupling capacitor between Arduinos 3.3V and ground on the nRF24 chip. I used a decoupling capacitor of 2nF as well as a big ass cap of 470uF on the mega and on the Nano I used a 2nF as well as a 220uF capacitor. It works!!!!!!!!!!!!!!!! If all the info prints it's just the power supply which is faulty.
En verdad un capacitor de 10uF en los 3.3 V del Arduino resolvio mi problema con el Mega y el nRF24L01
I'm having trouble with a micro talking to a mega
hey every one
i need a program to NRF24l01+ one led and switch in transmitter side and one led and switch in receiver side and transmit and receive dat at a time.... Pls Help
You were told in another thread to start your own thread.
Just for general information, I had a lot of trouble getting my Mega to talk to a Raspberry Pi with the the NRF24. It worked fine with a Nano, but not with the Mega 2560. Eventually found the problem to be the variable RadoNumber in the getting started example was set to 1 instead of 0.
Do you mean this line: radio.openReadingPipe(1, pipes); ?
I had the same issue.
Receiver worked fine on Arduino Uno with settings:
but Arduino Mega didn't despite of that radio.printDetails() displayed proper data.
I thought that might be pover problem with RF24 but it wasn't.
After change line above to:
Arduino Mega started work.
Thanks for hint.