Help With The NRF24L01 Module

I am building an rc car and I am trying to use a remote control but I can’t even get basic code for the NRF onto my board.


  • 2 Arduino Unos
  • 2 NRF24L01 Modules
  • A Funduino Shield

Any help would be appreciated. I am just trying to get the two to connect at the moment but the error is saying “sketch\RF24.h:18:25: fatal error: RF24_config.h: No such file or directory”

Pictures of the folder and the error code can be viewed in the images below.

The code I am using is from a youtube video by Kevin Darrah:

Thank You In Advance,

Images from Original Post so we don’t have to download them. See this Image Guide





Please post error message and code as text rather than pictures. I cannot read those images.

This Simple nRF24L01+ Tutorial may be helpful. I am using the second example (using ackPayload) to control model trains.


C:\Users\Owner\Desktop\NRF-Test-1\NRF-Test-1.ino:6:22: fatal error: nRF24L01.h: No such file or directory
#include <nRF24L01.h>
** ^**
compilation terminated.
exit status 1
Error compiling for board Arduino/Genuino Uno.

I try and remove the
#inclue <nRF24L01.h>
but it says the next #include is not in the directory either so I don’t know.

Also thank you for the response, I really appreciate it.

You do not have the nRF library installed correctly. See THIS: about libraries.

Lots of nRF24L01 How-To HERE:

Realise it’s an old post but same problems here.

When I go to one of the links it says " NOTE! If you get a Library that is labelled “Master”, like “” you must RENAME the Zip file AND the folder inside it to remove the “-Master” part! "

Well, I tried that, but does not work. One can change the name of the zip folder but not the one inside it.
Do we have to unzip, then rename, then zip it up again.

Anyhow, the ide when compiling says it cannot find the file yet, when I check the library, it is already there.

Do not know why it is looking for the file in the folder where I downloaded the code either.

Arduino: 1.8.5 (Windows 7), Board: “Arduino Pro or Pro Mini, ATmega328P (5V, 16 MHz)”

C:\Users\bob\Desktop\iForce2D Programs\temp_tester_new\temp_tester_new.ino:22:22: fatal error: nRF24L01.h: No such file or directory

#include <nRF24L01.h>


compilation terminated.

exit status 1
Error compiling for board Arduino Pro or Pro Mini.

This report would have more information with
“Show verbose output during compilation”
option enabled in File → Preferences.

 Connections for nRF24L01 pins
 1 - GND
 2 - VCC 3.3V !!! NOT 5V
 3 - CE to Arduino pin 9
 4 - CSN to Arduino pin 10
 5 - SCK to Arduino pin 13
 6 - MOSI to Arduino pin 11
 7 - MISO to Arduino pin 12
 Connections for OLED screen pins
 VCC - VCC (mine seems to work with both 5V and 3.3V
 SDA - arduino analog pin 4
 SCL - arduino analog pin 5 

#include <SPI.h>
#include <nRF24L01.h>
#include <RF24.h>
#include <SPI.h>
#include <Wire.h>
#include <Adafruit_GFX.h>
#include <Adafruit_SSD1306.h>

#define OLED_RESET 4
Adafruit_SSD1306 display(OLED_RESET);

#if (SSD1306_LCDHEIGHT != 64)
#error("Height incorrect, please fix Adafruit_SSD1306.h!");

const uint64_t pipeIn =  0xE8E8F0F0E1LL; // match this on both sides!

RF24 radio(9, 10);

// The sizeof this struct should not exceed 32 bytes
struct MyData {
  byte throttle;
  byte yaw;
  byte pitch;
  byte roll;
  byte dial1;
  byte dial2;
  byte switches; // bitflag

MyData data;

unsigned long packetsRead = 0;
unsigned long lastUpdate = 0;
int packetsSec = 0;
unsigned long lastRecvTime = 0;
unsigned long drops = 0;


// writes a single line of formatted text to the screen at the current cursor position - keep it short!
void displayln(const char* format, ...)
  char buffer[64];
  va_list args;
  va_start(args, format);
  vsprintf(buffer, format, args);
  int len = strlen(buffer);
  for (uint8_t i = 0; i < len; i++) {


void setup()
  radio.setDataRate(RF24_250KBPS); // Both endpoints must have this set the same
  radio.setAutoAck(false); // Both endpoints must have this set the same


  display.begin(SSD1306_SWITCHCAPVCC, 0x3C);  // initialize with the I2C addr 0x3D (for the 128x64)
  memset(&data, 0, sizeof(MyData));



void recvData()
  while ( radio.available() ) {   , sizeof(MyData));
    lastRecvTime = millis();
  unsigned long now = millis();
  if ( now - lastRecvTime > 1000 ) {


void displayBits(byte b, int howManyBits)
  for (int i = 0; i < howManyBits; i++) {
    int mask = 1 << i;
    if ( b & mask )


void updateScreen()
  unsigned long now = millis();
  if ( now - lastUpdate > 1000 ) {
    packetsSec = packetsRead;
    packetsRead = 0;
    lastUpdate = now;
  char buf[16];
  displayln("Packets = %d\n", packetsSec);
  displayln("%d\n", data.throttle);
  displayln("%d\n", data.yaw);
  displayln("%d\n", data.pitch);
  displayln("%d\n", data.roll);
  displayln("%d\n", data.dial1);
  displayln("%d\n", data.dial2);
  // draw rectangle for joystick outline
  display.drawRect(30,12, 40,40, 1);
  display.drawRect(75,12, 40,40, 1);
  int d1 = map(data.throttle, 0, 255, 0, 100);
  int d2 = map(data.yaw,      0, 255, 0, 100);
  int d3 = map(data.pitch,    0, 255, 0, 100);
  int d4 = map(data.roll,     0, 255, 0, 100);
  // draw dot for current joystick position
  display.fillRect(30+40*(d2/100.0)-3, 52-40*(d1/100.0)-3, 6,6, 1);
  display.fillRect(75+40*(d4/100.0)-3, 52-40*(d3/100.0)-3, 6,6, 1);
  displayBits(data.switches, 8);
  display.write(' ');
  displayln("%ld drops\n", drops);


void loop()

What is the full path to the location where you have installed the RF24 library?

What version of the RF24 library have you installed?


Hi Robin,

I managed to get it up and running. Seems either the library was old or perhaps not even installed.

How I rectified the problem was to go to the "sketch" ....."include library" ...."manage libraries" and did a search for RF24. Scrolled down until I found it and hit "more info" ...program pretty much took care of it from there.

Apologies for the vacant brain cells.

I did read about the location having to be directly in the arduino/libraries/

When you have a directory named with something like "RF24-master", then changing the name to just "RF24" would help solve the issue of 'no such file or directory'.

Also,make sure that the newly obtained "RF24" library is present inside the libraries folder of the Arduino folder.