Hello
I have the following set-up:
An Arduino pro mini with a NRF24l01 module incorporated - one of these
https://www.electrodragon.com/product/nrf24duino-arduino-mini-plus-nrf24l01-board/
Attached to this is an SD card reader on pins 10-13 (pin 10 as CS)
Also attached to this is an OLED display (this is not currently in use though it does work)
I have a 100uf capacitor across the supply to the ATMEGA (across the regulated 3.3V not the VIN)
All this connected to the PC with a FDTI board.
Running the following simple code (adapted originally from Robin2's sample sketch):
#include <SPI.h>
#include <nRF24L01.h>
#include <RF24.h>
#include <SD.h>
byte currentcard [13];
File myFile;
const int chipSelect = 10;
#define CE_PIN 7
#define CSN_PIN 10
const byte thisSlaveAddress[5] = {'R', 'x', 'A', 'A', 'A'};
RF24 radio(CE_PIN, CSN_PIN);
byte dataReceived[13]; // this must match dataToSend in the TX
bool newData = false;
//===========
void setup() {
Serial.begin(9600);
pinMode(SS, OUTPUT);
delay(200);
if (!SD.begin(chipSelect)) {
Serial.println("card initialization failed!");
return;
}
Serial.println("card initialization done.");
Serial.println("SimpleRx Starting");
radio.begin();
radio.setDataRate( RF24_250KBPS );
radio.openReadingPipe(1, thisSlaveAddress);
radio.startListening();
}
//=============
void loop() {
if ( radio.available() ) {
radio.read( ¤tcard, sizeof(currentcard) );
newData = true;
for (int i = 0; i < 13; i++) Serial.println (currentcard[i]);
}
}
Problem: so long as the card reader is connected, the nrf24l01 does not receive (or at least, hardly ever). If I disconnect the card reader, it works. The card reader itself works (if it is connected, it will initialise and read/write cards).
As stated, I've included the often-recommended capacitor even though I have never needed it to work before with this module.
I did wonder if there was a power supply issue. The card reader seems to be drawing about 7mA which doesn't seem a great deal.
Any ideas please, or more information needed?