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 : RF24 - Arduino Libraries
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 >:( ...