NRF24L01 Module Wireless 2.4GHz
This product is not recommended for new designs. Nordic recommends its drop-in compatible nRF24L01+ or for a System-on-Chip solution the Nordic nRF24LE1 or nRF24LU1+.
The nRF24L01 is a highly integrated, ultra low power (ULP) 2Mbps RF transceiver IC for the 2.4GHz ISM (Industrial, Scientific and Medical) band. With peak RX/TX currents lower than 14mA, a sub μA power down mode, advanced power management, and a 1.9 to 3.6V supply range, the nRF24L01 provides a true ULP solution enabling months to years of battery lifetime when running on coin cells or AA/AAA batteries. The Enhanced ShockBurst™ hardware protocol accelerator additionally offloads time critical protocol functions from the application microcontroller enabling the implementation of advanced and robust wireless connectivity with low cost 3rd-party microcontrollers.
The nRF24L01 integrates a complete 2.4GHz RF transceiver, RF synthesizer, and baseband logic including the Enhanced ShockBurst™ hardware protocol accelerator supporting a high-speed SPI interface for the application controller. No external loop filter, resonators, or VCO varactor diodes are required, only a low cost ±60ppm crystal, matching circuitry, and antenna.
The Nordic nRF24L01 is available in a compact 20-pin 4 x 4mm QFN package
http://www.nordicsemi.com/eng/Products/2.4GHz-RF/nRF24L01
Connect NRF24L01 to Arduino
- Vcc to 3.3V
- Gnd to Gnd
- CSN to 7
- CE to 8
- MOSI to 11
- SCK to 13
- MISO to 12
Source Code for TX
#include <SPI.h>
#include <nRF24L01p.h>
nRF24L01p transmitter(7,8);//CSN,CE
void setup(){
delay(150);
Serial.begin(115200);
SPI.begin();
SPI.setBitOrder(MSBFIRST);
transmitter.channel(90); // Channel have to the same
transmitter.TXaddress("AAR"); // Create not over five both RX and TX the same
transmitter.init();
}
String message;
void loop(){
transmitter.txPL("How are you"); // Send message
transmitter.send(FAST); // Send
delay(1000);
}
#include <nRF24L01p.h>
nRF24L01p transmitter(7,8);//CSN,CE
void setup(){
delay(150);
Serial.begin(115200);
SPI.begin();
SPI.setBitOrder(MSBFIRST);
transmitter.channel(90); // Channel have to the same
transmitter.TXaddress("AAR"); // Create not over five both RX and TX the same
transmitter.init();
}
String message;
void loop(){
transmitter.txPL("How are you"); // Send message
transmitter.send(FAST); // Send
delay(1000);
}
Source code for RX
#include<SPI.h>
#include<nRF24L01p.h>
nRF24L01p receiver(7,8);//CSN,CE
void setup(){
delay(150);
Serial.begin(115200);
SPI.begin();
SPI.setBitOrder(MSBFIRST);
receiver.channel(90); // The same both RX and TX
receiver.RXaddress("AAR"); // The same both RX and TX
receiver.init();
}
String message;
void loop(){
if(receiver.available()){
receiver.read(); // Command to read data
receiver.rxPL(message); // Keep data in "message"
Serial.println(message); // Print out to serial monitor
message="";
}
}