EasyManuals Logo

Arduino NRF24L01 User Manual

Arduino NRF24L01
14 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #4 background imageLoading...
Page #4 background image
Arduino Codes
First we need to download and install the RF24 library which makes the programming less difficult.
Here are the two codes for the wireless communication and below is the description of them.
Transmitter Code
1./*
2.* Arduino Wireless Communication Tutorial
3.* Example 1 - Transmitter Code
4.*
5.* by Dejan Nedelkovski, www.HowToMechatronics.com
6.*
7.* Library: TMRh20/RF24, https://github.com/tmrh20/RF24/
8.*/
9.#include <SPI.h>
10.#include <nRF24L01.h>
11.#include <RF24.h>
12.RF24 radio(7, 8); // CE, CSN
13.const byte address[6] = "00001";
14.void setup() {
15.radio.begin();
16.radio.openWritingPipe(address);
17.radio.setPALevel(RF24_PA_MIN);
18.radio.stopListening();
19.}
20.void loop() {
21.const char text[] = "Hello World";
22.radio.write(&text, sizeof(text));
23.delay(1000);
24.}

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Arduino NRF24L01 and is the answer not in the manual?

Arduino NRF24L01 Specifications

General IconGeneral
Maximum Data Rate2 Mbps
Number of Channels125
InterfaceSPI
Data Rate250kbps, 1Mbps, 2Mbps
Operating Voltage1.9V - 3.6V
Current Consumption11.3mA transmitting, 12.3mA receiving
RangeUp to 100 meters (open space)
Dimensions15mm x 29mm

Related product manuals