NRF24L01 2.4GHz Transceiver Module

NRF24L01

These NRF24L01+ 2.4 GHz Transceiver Modules are the best! Using two more of these can start you on your way to the IOT (Internet of Things) using your Arduino, Raspberry Pi or other microcontrollers.

Some people have got quite a bit of range out of these little guys. Depending on your location and the amount of interference, we are talking 100+ feet in some situations but personally my tests have shown around 50 feet for stable working. Perfect for in home or around projects like keeping track of your hydroponics and security system.

The only major thing to keep in mind is the volts these little guys can handle. 3.3v is it. Putting anymore through them will not end well for them. But you can use a small capacitor between the VCC and GND to provide a bit more stability if you are having problems at longer distances.

They are a must have for anyone looking to make their projects communicate.

 

Arduino Pin NRF24L01 Pin
9 3
10 4
11 6
12 7
13 5
GND 1
3.3v 2

 

Transmitor Arduino Code...

#include <SPI.h>
#include <nRF24L01.h>
#include <RF24.h>
#define CE_PIN 9
#define CSN_PIN 10

const uint64_t pipe = 0xE8E8F0F0E1LL;

RF24 radio(CE_PIN, CSN_PIN);
int data[2];

void setup()
{
Serial.begin(9600);
radio.begin();
radio.openWritingPipe(pipe);
}

void loop()
{
Serial.println("Trying");
data[0] = 1;
data[1] = 0;
radio.write( data, sizeof(data) );
Serial.println("Done");
}

Receiver Arduino Code...

#include <SPI.h>
#include <nRF24L01.h>
#include <RF24.h>
#define CE_PIN 9
#define CSN_PIN 10

const uint64_t pipe = 0xE8E8F0F0E1LL;

RF24 radio(CE_PIN, CSN_PIN);

int data[2];

void setup()
{
Serial.begin(9600);
delay(1000);
Serial.println("Nrf24L01 Receiver Starting");
radio.begin();
radio.openReadingPipe(1, pipe);
radio.startListening();
}

void loop()
{
if ( radio.available() )
{
bool done = false;
while (!done)
{
done = radio.read( data, sizeof(data) );
Serial.print("X = ");
Serial.print(data[0]);
Serial.print(" Y = ");
Serial.println(data[1]);
}
}
else
{
Serial.println("No radio available");
}

}