Arduino Mega + nrf24L01 doesn't communicate, need your help, thank you

I am using nrf24 base module, I have nrf24 antenna and non antenna versions. I use base module so I didn't do this 100uF soldering between ground and 3.3v on the nrf24, I connected nrf24 on the 5v because I use base module. I read the tutorial given here in detail https://arduino-info.wikispaces.com/Nrf24L01-2.4GHz-HowTo. Apart from these I checked other tutorials too but my main problem always happens in the Arduino Mega that nrf24 and mega don2t communicate at all. However, arduino uno is working very well.

I connected CSN to pin 53 ( CSN's other name is SS - slave select ), SCK to pin 52, MOSI to pin 51, MISI to pin 50 at my arduino mega.

The libraries I tried which didn't work with arduino mega but worked with arduino uno:
1)Arduino driver for nRF24L01 maniacbug:GitHub - maniacbug/RF24: Arduino driver for nRF24L01 . Watched this tutorial too nRF24L01+ HOW TO FIX: Now sending ... failed. Failed, response timed out. RF24 nRF24 - YouTube
2)nRF24L01 for Arduino & Raspberry Pi/Linux Devices: GitHub - nRF24/RF24: OSI Layer 2 driver for nRF24L01 on Arduino & Raspberry Pi/Linux Devices

  1. tmrh20 nrf24 library with latest edition: http://www.arduinolibraries.info/libraries/rf24

Anyone would tell me where am I doing wrong while using arduino mega so I cannot communicate with nrf24L01 ? I made a huge research in the internet, everyone's common speech is " Arduino Mega is problematic with nrf24 ".

I found another solo tutorial which uses arduino mega with this nRF24L01 for Arduino & Raspberry Pi/Linux Devices Library that is working very well Arduino Wireless Communication – NRF24L01 Tutorial - YouTube. All the materials I got are new and working so it shouldn't be the problem caused by items but the wiring.

If still I cannot make communication with my arduino and nrf24L01, what kind of wireless communication device do you advise for me which will have easy setup and easy to use ? The reason I need wireless communication is " I have a wired joystick console ( Extreme Logitech 3D Pro https://secure.logitech.com/assets/17356/17356.png )and I want to send the data from my joystick to my robot to control it"

You have not said what pins on the Mega your nRF24 is connected to. MOSI, MISO and SCK are in a completely different place on a Mega compared to an Uno. See here

I have no problem using an nRF24 with a Mega.

...R
Simple nRF24L01+ Tutorial

Robin2:
You have not said what pins on the Mega your nRF24 is connected to. MOSI, MISO and SCK are in a completely different place on a Mega compared to an Uno. See here

I have no problem using an nRF24 with a Mega.

...R
Simple nRF24L01+ Tutorial

I connected, CE to pin 9, CSN to pin 53 ( CSN's other name is SS - slave select ), SCK to pin 52, MOSI to pin 51, MISI to pin 50 at my arduino mega. I was shared what pins I connected with a screenshots ).

I believe that I do the connections correctly but why it doesn't work ? I use original arduino mega too.

Note:
I updated my thread to show the shared links in more visual way.

Robin please would you share your wire connection for arduino mega while using the tmrh20 nrf24 library please ? thank you very much.

MEKACI:
I connected, CE to pin 9, CSN to pin 53 ( CSN's other name is SS - slave select ), SCK to pin 52, MOSI to pin 51, MISI to pin 50 at my arduino mega. I was shared what pins I connected with a screenshots ).

That seems correct.

Have you tried the examples in my tutorial?

Your photo (in Reply #2) seems to show a lot of stuff connected to the Mega as well as the nRF24.

Have you tried using the Mega on its own with the nRF24 as the only thing attached?

How are you powering the nRF24s?

...R

Robin2:
That seems correct.

Have you tried the examples in my tutorial?

Your photo (in Reply #2) seems to show a lot of stuff connected to the Mega as well as the nRF24.

Have you tried using the Mega on its own with the nRF24 as the only thing attached?

How are you powering the nRF24s?

…R

I have a usb shield on my arduino megA to control my logitech extreme 3d pro joystick ( I want to send my joystick data to 2nd arduino to make my robot move ).

I power up nRF24 with arduino’s ( 5v ).

When I click to T in serial monitor nothing appears. In addition, I even tried the older library of maniacbug’s library too and it gives everything as zero too like this:


Shortly, no communication at all between my arduino mega and nrf24. I use ARDUINO 1.8.5 version ( latest version ).

I want to ask one more thing. With one nrf24 on arduino uno will act as transmitter and that transmitter can communicate with other x2 receiver of other two arduino uno(s) , is it possible ? I am going to give up using arduino mega really, it made me mad, even I do everything correctly, it doesn’t work…

Robin2, I took off the arduino usb host shield and it has started to work >:( ... But I need that usb host shield for my logitech control too; so how can I use both of them at the same time now ? :o

MEKACI:
Robin2, I took off the arduino usb host shield and it has started to work >:( ... But I need that usb host shield for my logitech control too; so how can I use both of them at the same time now ? :o

I don't know the answer to that. I have never had a host shield and I don't know anything about it.

Maybe it also uses SPI for communication?

...R

PS. Don't post pictures of text - as you can see it is unreadable. Just copy and paste text and put it in code tags.

Robin2:
I don't know the answer to that. I have never had a host shield and I don't know anything about it.

Maybe it also uses SPI for communication?

...R

PS. Don't post pictures of text - as you can see it is unreadable. Just copy and paste text and put it in code tags.

I found this topic that shows how to use nrf24 with ethernet shield ( I never used or tried an ethernet shield myself too ) which thy use the same SPI. It seems that the usb host shield has same issue with nrf24 too.

I download the said library from here GitHub - greiman/DigitalIO: Fast Digital I/O, Software I2C, and Software SPI for AVR Arduino ( ast Digital I/O, Software I2C, and Software SPI for AVR Arduino ).

There are lot's of comments that requires intense knowledge. One of the comment says this:

TMRh20 commented on 3 Oct 2014
I don't understand that myself, since the SPI spec is pretty simple. Unless the Arduino is being used as a slave device for the touchscreen, but I don't think that is likely. The changes are included for digitalIO, just reinstall and edit the #define SPI_UART or #define SOFTSPI as desired in RF24_config.h.

Then another his comment says this:

Ok, so I've had a chance to look more at these issues, n here's what I got:
SoftSPI
I fixed some issues with the library that should actually allow the software spi lib or the spi_uart to work in conjunction with the SPI lib, so two can run at once. I don't have a w5100 to test with, but I've confirmed RF24 works with softSPI after initializing the regular SPI.

To test it out:

Install the digitalIO library
Reinstall the RF24 library from Updates
Open RF24_config.h in a text editor. Uncomment the line #define SOFTSPI
In your sketch, add #include DigitalIO.h
Note: Pins are listed as follows and can be modified in the RF24_config.h file
const uint8_t SOFT_SPI_MISO_PIN = 16;
const uint8_t SOFT_SPI_MOSI_PIN = 15;
const uint8_t SOFT_SPI_SCK_PIN = 14;

w5100 ethernet module

It turns out that the wiznet chips basically have a CE pin similar to RF24, and it needs to be toggled for other devices to get control of the SPI BUS. It seems the newer boards have some circuitry to manage this automatically.
Some older boards may have a jumper or pad labelled 'prog' of which one side is connected to this 'ce' pin. Advanced users could solder a wire to this, connect it to a digital pin, and toggle it before accessing other SPI devices. IMHO this is kind of a hack, but essentially a true fix that would allow hardware SPI.

Note: Pins are listed as follows and can be modified in the RF24_config.h file
const uint8_t SOFT_SPI_MISO_PIN = 16;
const uint8_t SOFT_SPI_MOSI_PIN = 15;
const uint8_t SOFT_SPI_SCK_PIN = 14;

This pin configuration above is coming from the latest nrf24 : http://www.arduinolibraries.info/libraries/rf24

Shortly, how are we going to use this " DigitalIO " library with nrf24 that usb host shield and nrf24 will not block each other ? I am confused now.

I tried these pin configuration alone itself on my arduino without connecting the usb shield and nrf24 doesn't work with that pins.

const uint8_t SOFT_SPI_MISO_PIN = 16;
const uint8_t SOFT_SPI_MOSI_PIN = 15;
const uint8_t SOFT_SPI_SCK_PIN = 14;

We solve one problem then another one appears >:( ...