Multiple SPI devices RF24 + SD

My project is for an Arduino DUE

Ok my problem is not that my code is not working, but that it works and I don’t know why. I was under the impression, that when you have Multiple SPI devices you have to disable one and enable the other in order to use them. but mine are working perfectly without doing this. I’m a little confused.

BTW most of this is snippets of code I have combined to get to this point.

#include <SPI.h>
#include <nRF24L01.h>
#include <RF24.h> 
#include <SD.h>
#define CE_PIN 9
#define CSN_PIN 10
RF24 radio(CE_PIN, CSN_PIN);
const uint64_t pipe = 0xE8E8F0F0E1LL;
const int chipSelect = 4;
int msg[1]; //Holding your sent message
String theMessage = ""; //Received Message
String inputString = ""; //Hold incoming Message from Serial

void setup(void) {
     while (!Serial) {}                     //Needed for Leonardo
     radio.begin();                         //Start the radio
     radio.setRetries(15, 15);              // optionally, increase the delay between retries & # of retries
     radio.setPayloadSize(8);               // optionally, reduce the payload size.
     radio.openReadingPipe(1, pipe);
     Serial.print("Initializing SD card...");
     if (!SD.begin(chipSelect)) {
     Serial.println("Card failed, or not present");
     Serial.println("card initialized.");

void loop(void) {
     if (radio.available()) {                //Wait for incoming message from radio
     receiveText();                          //Call funtion to receive message

void receiveText() {, 1);                    //Read radio 1 char at a time
    char theChar = msg[0];                 //Stor it in theChar
    if (msg[0] != 2) {                     //If you get \n char then
      theMessage.concat(theChar);          //link all together
    Serial.println(theMessage);          //Print to serial
    File dataFile ="datalog.txt", FILE_WRITE);
    if (dataFile) {
    Serial.println(theMessage + "**** SAVED ****");
    Serial.println("error opening datalog.txt");
    theMessage = "";                     //Clear Message
void serialEvent() {                     //if something happens in serial do this
  while (Serial.available()) {           //Do till you get all from serial
      char inChar = (char); // get the new byte:
      delay(3);                          //*****I add this else you get broken messages******
      inputString += inChar;             // add it to the inputString:
  sentText();                            //Call function to sent message to other radio

void sentText() {
    radio.stopListening();                  // First, stop listening so we can talk.
                                            // String theMessage = inputString; //
    int messageSize = inputString.length(); //Calculate String length
    for (int i = 0; i < messageSize; i++) { //Sending 1 char at a time to other radio
    int charToSend[1];                      //Hold the char to be send
    charToSend[0] = inputString.charAt(i);  //First char stored
    bool ok = radio.write(charToSend, 1);   //Sent char
    if (ok)                                 //This is not needed but will make you feel better
      msg[0] = 2;              //send the 'terminate string' value...
      radio.write(msg, 1);
      inputString = "";        // clear the string
      radio.startListening();  // Now, continue listening

u got locky. The devises 'shut their mouth' when their were told to..

(not all decices we buy do)