Hello guys,
I will try to provide as much information as I can.
Modules using: NRF24L01 + RFID reader on an Arduino Uno.
The problem: Both of these modules are using the well known MOSI, MISO, SCK. Now I thought that I wouldn't be able to have them connected at the same time to 1 Arduino because the Arduino had these pins only once (MOSI, MISO, SCK). Well that's not true I think, there are 2x3 ICSP pins on the Arduino which contains MOSI, MISO, SCK, RESET, VCC, GND.
So if I connect the RFID reader MOSI, MISO, SCK pins to 11, 12, 13 and the NRF24L01 pins to the 2x3 pins (the ICSP pins or something), should that work? Or are they not made for that?
Then the RFID reader uses the SDA and the RESET to define it in the code like this:
#define RST_PIN 9
#define SS_PIN 10
MFRC522 mfrc522(SS_PIN, RST_PIN);
So that I actually 'control' it with these 2 pins.
Now the NRF24L01 module is using the CSN and the CE pins to 'define' it in the code like this:
RF24 radio(7,8);
Pin 7 and 8 are the CSN and the CE pins, now can I just connect these 2 on any pins on the Arduino from 2-13? Or are these special pins as well?
I also made a schematic in Fritzing (attached down below) to show my wiring (if this is possible). The wires that are going to the breadboard are going to the RFID reader, just imagine there is one on that breadboard, because I couldn't find one in Fritzing, sorry.
I hope this explained my problem and someone can help me out.. maybe I'm thinking all wrong.
Thanks for the help in advance.
(P.S. I also attached a schematic with those 'ICSP' pins on the Arduino)

Both of these modules are using the well known MOSI, MISO, SCK.
You forgot the equally well-known "Chip Select" pin 
Groove:
You forgot the equally well-known "Chip Select" pin 
Yes true, but if I'm right both of these modules aren't using them, is that right?
The RFID uses: MOSI, MISO, SCK, SDA, RST, (VCC, GND)
The NRF24 uses: MOSI, MISO, SCK, CSN, CE, (VCC, GND)
Correct me if I'm wrong!
akatchi:
The RFID uses: MOSI, MISO, SCK, SDA, RST, (VCC, GND)
The NRF24 uses: MOSI, MISO, SCK, CSN, CE, (VCC, GND)
Both of these modules are using them.
Whandall:
Both of these modules are using them.
Oh sorry I didn't know that, thanks for telling me!
But is it possible what I'm trying, will it work? Or is it totally stupid?
Thanks!
Both devices should be able to operate in the same sketch.
The ICSP pins are directly connected to the SPI pins on the digital pin connectors, no problem in using both.
Whandall:
Both devices should be able to operate in the same sketch.
The ICSP pins are directly connected to the SPI pins on the digital pin connectors, no problem in using both.
So I can just connect those, I was right :D??
Thank you so much!
When you make a (prototype) shield using SPI you have to use the ICSP header,
so the shield can work on Uno, Leonardo and Mega.
Whandall:
When you make a (prototype) shield using SPI you have to use the ICSP header,
so the shield can work on Uno, Leonardo and Mega.
But I'm not using a shield, I'm using it to connect a module. Because I have 2 modules that both use these pins. That is not a problem right? It won't kill my arduino or anything right?
SPI is designed to support multiple devices.
Whandall:
SPI is designed to support multiple devices.
Hello,
I connected everything as like in the sketch above, I've tried so many but it won't work. I connected the RFID scanner and the NRF24 module to the same Arduino, both using the MOSI, MISO, SCK pins. NRF is connected to the ICSP pins, but the moment you scan a card and it send 'Scanned cards' data out to the other arduino it stops working, it will scan the card once, and then the LED on pin 13 (which indicates the SCK from the RFID) stops and turns off, after that the scanner doesn't work anymore and I have to restart the Arduino, and then it will only scan it once...
Do you know what I'm doing wrong? Code currently using (the standard MRFC example code but added the NRF24 in it):
#include <SPI.h>
#include <MFRC522.h>
#include "RF24.h"
#define RST_PIN 9 // Configurable, see typical pin layout above
#define SS_PIN 10 // Configurable, see typical pin layout above
byte adres[6] = {"ABCDE"};
int scans = 0;
MFRC522 mfrc522(SS_PIN, RST_PIN); // Create MFRC522 instance
RF24 radio(4,5);
void setup() {
Serial.begin(115200); // Initialize serial communications with the PC
SPI.begin(); // Init SPI bus
mfrc522.PCD_Init(); // Init MFRC522
mfrc522.PCD_DumpVersionToSerial(); // Show details of PCD - MFRC522 Card Reader details
Serial.println(F("Scan PICC to see UID, SAK, type, and data blocks..."));
radio.begin();
radio.setPALevel(RF24_PA_MIN);
radio.openWritingPipe(adres);
radio.stopListening();
}
void loop() {
// Look for new cards
if ( ! mfrc522.PICC_IsNewCardPresent()) {
return;
}
// Select one of the cards
if ( ! mfrc522.PICC_ReadCardSerial()) {
return;
}
delay(100);
scans = scans + 1;
Serial.println(scans);
radio.write(&scans, sizeof(scans));
delay(100);
}
The output in the console is just a 1, (and sometimes 1 and 2), while the loop should be a never ending loop, and the indicator LED on 13 goes off as well, so there is going something wrong, but what and how to fix!