Arduino and RF(nRF24L01+)

One of the cool things you can do with Arduino is interfacing with RF modules.There are different types of RF boards available in the market. We are going to work with “nrf24L01+”Transceiver chip from NordicSemiconductor
Mounted on a breakout board from
Sparkfun.

Before you start

For this project you need two Arduino boards and two RF modules. Download and install  this library for Arduino program(Mirf). Extract the files and put (the folder) in the Library folder in the Arduino installation path:
Windows: “\arduino-1.0.1\libraries\”
OS X: “/Applications/Arduino.app/Contents/Resources/Java/libraries”
You must restart Arduino Program after installing above libraries.

The Circuit

The project consists of a sender and a receiver . The connections for the nrf 24L01+ for the sender and receiver is as picture below

In the sender circuit you also need to connect a potentiometer to pin A0 as shown here: 

On the receiver side add a LED as shown below:

Now download  the code for the sender and receiver below and upload it to the Arduinos:

Sender

Receiver

By changing the potentiometer on the sender side you see the LED on the receiver side changes intensity.

The code used in this post is slightly changed version of the code from http://www.bajdi.com/playing-with-nrf24l01-modules/

Advertisements

3 responses to “Arduino and RF(nRF24L01+)

  1. For linux(ubuntu 9.10):

    Download (SPI, Mirf) libraries.
    extract them in a folder and move them to:
    /usr/share/arduino/libraries
    sudo cp -r ./Mirf /usr/share/arduino/libraries
    sudo cp -r ./SPI /usr/share/arduino/libraries
    And then you nead to change the permissions on the folders.
    sudo chmod -R 755 Mirf/
    sudo chmod -R 755 SPI/

  2. Thank You for your detailed, complete & accurate documentation. I just bought a pair of these RF24L01 and had no clue how to get them to work for my Geocache project. I used your code and wiring diagrams and was able to get up and running in only 1 evening. Not only was it painless, it was even fun…

    Great Job, and Thank You again!

  3. tahnk you, i spend months to do nRF24 modules to do something, great tutorial!!!!

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s