nRF24L01+ Transceiver Hookup Guide

Pages
Contributors: Toni_K
Favorited Favorite 4

Arduino Code

There are a lot of libraries available for this module, but we recommend using the RF24 library, originally written by maniacBug, and updated for Arduino 1.6x by TMRh20.

You can find the most up-to-date version of the library here. Alternatively, you can download this zip and install it into your Arduino IDE libraries folder. If you need help with the library installation, please check out our tutorial.

Once you have your code properly installed, open up Examples → RF24 → GettingStarted.ino.

Check out the User Configuration section of the code, and make sure you update yours as shown below.

language:c
/****************** User Config ***************************/
/***      Set this radio as radio number 0 or 1         ***/
bool radioNumber = 1;

/* Hardware configuration: Set up nRF24L01 radio on SPI bus plus pins 9 & 10 */
RF24 radio(9,10);

One radio should have the radioNumber set to 0 and the other should be set to 1.

Upload the code to your Redboards. Once you have them both set up, you can open up two terminals set at 115200 bps, 8-N-1, and you should see the following appear on the terminal.

language:c
RF24/examples/GettingStarted
*** PRESS 'T' to begin transmitting to the other node

Press T in one terminal, press R in the other, and wait until you start seeing your radios communicating! You should see something similar in your terminal.

Terminal Output

Receiver output in the terminal.