Optimized High Speed NRF24L01+ Driver Class Documenation  V1.0
TMRh20 2014 - Optimized Fork of NRF24L01+ Driver

RF24 is fully compatible with Arduino boards
See http://www.arduino.cc/en/Reference/Board and http://arduino.cc/en/Reference/SPI for more information

RF24 makes use of the standard hardware SPI pins (MISO,MOSI,SCK) and requires two additional pins, to control the chip-select and chip-enable functions.
These pins must be chosen and designated by the user, in RF24 radio(ce_pin,cs_pin); and can use any available pins.

Arduino Due

RF24 makes use of the extended SPI functionality available on the Arduino Due, and requires one of the defined hardware SS/CS pins to be designated in RF24 radio(ce_pin,cs_pin);
See http://arduino.cc/en/Reference/DueExtendedSPI for more information

Initial Due support taken from https://github.com/mcrosson/RF24/tree/due

Alternate SPI Support

RF24 supports alternate SPI methods, in case the standard hardware SPI pins are otherwise unavailable.

Software Driven SPI

Software driven SPI is provided by the DigitalIO library


  1. Install the digitalIO library
  2. Open RF24_config.h in a text editor. Uncomment the line #define SOFTSPI
  3. In your sketch, add #include DigitalIO.h
Note: Pins are listed as follows and can be modified by editing 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;

Alternate Hardware (UART) Driven SPI

The Serial Port (UART) on Arduino can also function in SPI mode, and can double-buffer data, while the default SPI hardware cannot.

The SPI_UART library is available at https://github.com/TMRh20/Sketches/tree/master/SPI_UART


  1. Install the SPI_UART library
  2. Edit RF24_config.h and uncomment #define SPI_UART
  3. In your sketch, add
    #include <SPI_UART.h>

SPI_UART SPI Pin Connections:

NRF Arduino Uno Pin
CE User Specified
CSN User Specified
SPI_UART on Mega boards requires soldering to an unused pin on the chip.
See https://github.com/TMRh20/RF24/issues/24 for more information on SPI_UART.