Install the digitalIO libraryReinstall the RF24 library from UpdatesOpen RF24_config.h in a text editor. Uncomment the line #define SOFTSPIIn your sketch, add #include DigitalIO.hNote: Pins are listed as follows and can be modified in the RF24_config.h fileThis is for Arduino Mega with latest version of nrf24 library: http://www.arduinolibraries.info/libraries/rf24const uint8_t SOFT_SPI_MISO_PIN = 16;const uint8_t SOFT_SPI_MOSI_PIN = 15;const uint8_t SOFT_SPI_SCK_PIN = 14;An other nRF24L01 Library for Arduino & Raspberry Pi/Linux Devices ( for Arduino UNO ): https://github.com/nRF24/RF24
They are not working at the same time because thy share the same SPI
SPI is meant to be shared. They only need different CS lines. There shouldn't be any need to much around with software SPI for that.
From the readings, what I understand is "nrf24 and usb shield are using the pin 10 as SS ( slave select )"; so how can I change and assign that pin 10 to another pin which will make these two modules to work together ? thank you.
Pull one of the pins out of the header and wire it to a different pin. Get a nRF24 that isn't on a shield and you can wire it any way you want. Mount the shield somewhere other than on top of the board and wire it to whatever pins. There are myriad different ways to change how a shield connects to a board. You'll probably want to also have a look in the library code for the one you change and make sure you change what pin it refers to there as well.