Sie sind auf Seite 1von 45

7/8/2019 Arduino Wireless Communication - NRF24L01 Tutorial - HowToMechatronics

(https://howtomechatronics.com)

 WHAT'S NEW?  Arduino Robot Arm and Mecanum Wheels Platform Automatic Op…

(https://www.youtube.com/user/DejanNedelkovski)

 (https://plus.google.com/+Howtomechatronics)
 (https://www.facebook.com/howtomechatronics/)
Follow me on: ()

Home (https://howtomechatronics.com) 
Tutorials (https://howtomechatronics.com/category/tutorials/)  Arduino Tutorials

(https://howtomechatronics.com/category/tutorials/arduino/)

Arduino Wireless Communication – NRF24L01 Tutorial


 Dejan (https://howtomechatronics.com/author/howtom12_wp/)

 Arduino Tutorials (https://howtomechatronics.com/category/tutorials/arduino/)

 72 (https://howtomechatronics.com/tutorials/arduino/arduino-wireless-communication-nrf24l01-
tutorial/#comments)

In this Arduino tutorial we will learn how to make a wireless communication between two
Arduino boards using the NRF24L01 transceiver module. You can watch the following video or
read the written tutorial below.

Arduino Wireless Communication – NRF24L01 Tutorial

This website uses cookies to improve user experience. By using our website, you agree to our use of cookies.

Ok Read more (https://howtomechatronics.com/privacy-policy-page/)

https://howtomechatronics.com/tutorials/arduino/arduino-wireless-communication-nrf24l01-tutorial/ 1/45
7/8/2019 Arduino Wireless Communication - NRF24L01 Tutorial - HowToMechatronics

Overview

For explaining the wireless communication we will make two examples, the rst one will be
sending a simple “Hello World” message from one Arduino to another, and in the second
example we will have a bi-directional communication between the Arduino boards, where
using the Joystick at the rst Arduino we will control the servo motor at the second Arduino,
and vice versa, using the push button at the second Arduino we will control the LED at the rst
Arduino.

NRF24L01 Transceiver Module

Let’s take a closer look at the NRF24L01 transceiver module. It uses the 2.4 GHz band and it
can operate with baud rates from 250 kbps up to 2 Mbps. If used in open space and with
lower baud rate its range can reach up to 100 meters.

This website uses cookies to improve user experience. By using our website, you agree to our use of cookies.

Ok Read more (https://howtomechatronics.com/privacy-policy-page/)

https://howtomechatronics.com/tutorials/arduino/arduino-wireless-communication-nrf24l01-tutorial/ 2/45
7/8/2019 Arduino Wireless Communication - NRF24L01 Tutorial - HowToMechatronics

The module can use 125 di erent channels which gives a possibility to have a network of 125
independently working modems in one place. Each channel can have up to 6 addresses, or
each unit can communicate with up to 6 other units at the same time
(https://howtomechatronics.com/tutorials/arduino/how-to-build-an-arduino-wireless-network-
with-multiple-nrf24l01-modules/).

The power consumption of this module is just around 12mA during transmission, which is
even lower than a single LED. The operating voltage of the module is from 1.9 to 3.6V, but the
good thing is that the other pins tolerate 5V logic, so we can easily connect it to an Arduino
without using any logic level converters.

This website uses cookies to improve user experience. By using our website, you agree to our use of cookies.

Ok Read more (https://howtomechatronics.com/privacy-policy-page/)

https://howtomechatronics.com/tutorials/arduino/arduino-wireless-communication-nrf24l01-tutorial/ 3/45
7/8/2019 Arduino Wireless Communication - NRF24L01 Tutorial - HowToMechatronics

Three of these pins are for the SPI communication and they need to be connected to the SPI
pins of the Arduino, but note that each Arduino board have di erent SPI pins. The pins CSN
and CE can be connected to any digital pin of the Arduino board and they are used for setting
the module in standby or active mode, as well as for switching between transmit or command
mode. The last pin is an interrupt pin which doesn’t have to be used.

So once we connect the NRF24L01 modules to the Arduino boards we are ready to make the
codes for both the transmitter and the receiver.

You can get the components needed for this Arduino Tutorial from the links below:

This website uses


NRF24L01 cookies to improve
Transceiver user experience.
Module……… Amazon By (https://amzn.to/2Oc84eJ) /
using our website, you agree to our use of cookies.
Banggood
(https://howtomechatronics.com/recommends/nrf24l01-banggood/)
Ok Read more (https://howtomechatronics.com/privacy-policy-page/)

https://howtomechatronics.com/tutorials/arduino/arduino-wireless-communication-nrf24l01-tutorial/ 4/45
7/8/2019 Arduino Wireless Communication - NRF24L01 Tutorial - HowToMechatronics

Arduino Board ……………………………… Amazon (https://amzn.to/2Ccd5kC) / Banggood


(https://howtomechatronics.com/recommends/arduino-mega-board-bg/)

Breadboard and Jump Wires ………… Amazon (https://amzn.to/2LYGILy) / Banggood


(https://howtomechatronics.com/recommends/breadboard-and-jump-wires-
banggod/)

*Please note: These are a liate links. I may make a commission if you buy the components through
these links. I would appreciate your support in this way!

Arduino Codes

First we need to download and install the RF24 library


(https://github.com/tmrh20/RF24/) which makes the programming less di cult.

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.
10. #include <SPI.h>
11. #include <nRF24L01.h>
12. #include <RF24.h>
13.
14. RF24 radio(7, 8); // CE, CSN
15.
16. const byte address[6] = "00001";
17.
18. void setup() {
19. radio.begin();
20. radio.openWritingPipe(address);
21. radio.setPALevel(RF24_PA_MIN);
22. radio.stopListening();
23. }
24.
25. void loop() {
26. const char text[] = "Hello World";
27. radio.write(&text, sizeof(text));
28. delay(1000);
29. }

Receiver Code
This website uses cookies to improve user experience. By using our website, you agree to our use of cookies.

Ok Read more (https://howtomechatronics.com/privacy-policy-page/)

https://howtomechatronics.com/tutorials/arduino/arduino-wireless-communication-nrf24l01-tutorial/ 5/45
7/8/2019 Arduino Wireless Communication - NRF24L01 Tutorial - HowToMechatronics

1. /*
2. * Arduino Wireless Communication Tutorial
3. * Example 1 - Receiver Code
4. *
5. * by Dejan Nedelkovski, www.HowToMechatronics.com
6. *
7. * Library: TMRh20/RF24, https://github.com/tmrh20/RF24/
8. */
9.
10. #include <SPI.h>
11. #include <nRF24L01.h>
12. #include <RF24.h>
13.
14. RF24 radio(7, 8); // CE, CSN
15.
16. const byte address[6] = "00001";
17.
18. void setup() {
19. Serial.begin(9600);
20. radio.begin();
21. radio.openReadingPipe(0, address);
22. radio.setPALevel(RF24_PA_MIN);
23. radio.startListening();
24. }
25.
26. void loop() {
27. if (radio.available()) {
28. char text[32] = "";
29. radio.read(&text, sizeof(text));
30. Serial.println(text);
31. }
32. }

Description:

So we need to include the basic SPI and the newly installed RF24 libraries and create an RF24
object. The two arguments here are the CSN and CE pins.

1. RF24 radio(7, 8); // CE, CSN

Next we need to create a byte array which will represent the address, or the so called pipe
through which the two modules will communicate.

1. const byte address[6] = "00001";

We can change the value of this address to any 5 letter string and this enables to choose to
which receiver we will talk, so in our case we will have the same address at both the receiver
and the transmitter.

This website uses cookies to improve user experience. By using our website, you agree to our use of cookies.

Ok Read more (https://howtomechatronics.com/privacy-policy-page/)

https://howtomechatronics.com/tutorials/arduino/arduino-wireless-communication-nrf24l01-tutorial/ 6/45
7/8/2019 Arduino Wireless Communication - NRF24L01 Tutorial - HowToMechatronics

In the setup section we need to initialize the radio object and using the
radio.openWritingPipe() function we set the address of the receiver to which we will send data,
the 5 letter string we previously set.

1. radio.openWritingPipe(address);

On the other side, at the receiver, using the radio.setReadingPipe() function we set the same
address and in that way we enable the communication between the two modules.

1. radio.openReadingPipe(0, address);

Then using the radio.setPALevel() function we set the Power Ampli er level, in our case I will
set it to minimum as my modules are very close to each other.

1. radio.setPALevel(RF24_PA_MIN);

Note that if using a higher level it is recommended to use a bypass capacitors across GND and
3.3V of the modules so that they have more stable voltage while operating.

Next we have the radio.stopListening() function which sets module as transmitter, and on the
other side, we have the radio.startListening() function which sets the module as receiver.

1. // at the Transmitter
2. radio.stopListening();

1. // at the Receiver
2. radio.startListening();

In the loop section, at the transmitter, we create an array of characters to which we assign the
message “Hello World”. Using the radio.write() function we will send that message to the
receiver. The rst argument here is the variable that we want to be sent.

1. void loop() {
2. const char text[] = "Hello World";
3. radio.write(&text, sizeof(text));
4. delay(1000);
5. }

By using the “&” before the variable name we actually set an indicating of the variable that
stores the data that we want to be sent and using the second argument we set the number of
bytes that we want to take from that variable. In this case the sizeof() function gets all bytes of
This website uses cookies to improve user experience. By using our website, you agree to our use of cookies.
the strings “text”. At the
Ok
endRead
of the program we will add 1 second delay.
more (https://howtomechatronics.com/privacy-policy-page/)

https://howtomechatronics.com/tutorials/arduino/arduino-wireless-communication-nrf24l01-tutorial/ 7/45
7/8/2019 Arduino Wireless Communication - NRF24L01 Tutorial - HowToMechatronics

On the other side, at the receiver, in the loop section using the radio.available() function we
check whether there is data to be received. If that’s true, rst we create an array of 32
elements, called “text”, in which we will save the incoming data.

1. void loop() {
2. if (radio.available()) {
3. char text[32] = "";
4. radio.read(&text, sizeof(text));
5. Serial.println(text);
6. }
7. }

Using the radion.read() function we read and store the data into the “text” variable. At the end
we just print text on the serial monitor. So once we upload both programs, we can run the
serial monitor at the receiver and we will notice the message “Hello World” gets printed each
second.

Arduino Wireless Bi-directional Communication

Let’s see the second example, a bi-directional wireless communication between two Arduino
boards. Here’s the circuit schematics:

You can get the components needed for this example from the links below:
This website uses cookies to improve user experience. By using our website, you agree to our use of cookies.

Ok Read more (https://howtomechatronics.com/privacy-policy-page/)

https://howtomechatronics.com/tutorials/arduino/arduino-wireless-communication-nrf24l01-tutorial/ 8/45
7/8/2019 Arduino Wireless Communication - NRF24L01 Tutorial - HowToMechatronics

NRF24L01 Transceiver Module………… Amazon (https://amzn.to/2Oc84eJ) / Banggood


(https://howtomechatronics.com/recommends/nrf24l01-banggood/)

Arduino Board…………………………………. Amazon (https://amzn.to/2FZo3tX) / Banggood


(https://howtomechatronics.com/recommends/arduino-nano-banggood/)

Joystick Module ………………………………. Amazon


(https://amzn.to/2OKUSP4) / Banggood
(https://howtomechatronics.com/recommends/joystick-banggood/)

Servo Motor ……………………………………. Amazon


(https://amzn.to/2M3bnHm) / Banggood
(https://howtomechatronics.com/recommends/micro-servo-motor-banggood/)

Pushbutton …………………………………….. Amazon (https://amzn.to/2LTW70e) / Banggood


(https://howtomechatronics.com/recommends/push-button-momentary-banggood/)

LED ………………………………………………… Amazon


(https://amzn.to/2MeNzNF) / Banggood
(https://howtomechatronics.com/recommends/leds-banggood/)

*Please note: These are a liate links. I may make a commission if you buy the components through
these links. I would appreciate your support in this way!

See Also

How To Build an Arduino Wireless Network with Multiple NRF24L01 Modules


(https://howtomechatronics.com/tutorials/arduino/how-to-build-an-arduino-
wireless-network-with-multiple-nrf24l01-modules/)

Source Codes

Here are the two codes and below is the description of them.

Transmitter Code

This website uses cookies to improve user experience. By using our website, you agree to our use of cookies.
1. /* Ok Read more (https://howtomechatronics.com/privacy-policy-page/)
2. * Arduino Wireless Communication Tutorial
https://howtomechatronics.com/tutorials/arduino/arduino-wireless-communication-nrf24l01-tutorial/ 9/45
7/8/2019 Arduino Wireless Communication - NRF24L01 Tutorial - HowToMechatronics

3. * Example 2 - Transmitter Code


4. *
5. * by Dejan Nedelkovski, www.HowToMechatronics.com
6. *
7. * Library: TMRh20/RF24, https://github.com/tmrh20/RF24/
8. */
9.
10. #include <SPI.h>
11. #include <nRF24L01.h>
12. #include <RF24.h>
13.
14. #define led 12
15.
16. RF24 radio(7, 8); // CE, CSN
17. const byte addresses[][6] = {"00001", "00002"};
18. boolean buttonState = 0;
19.
20. void setup() {
21. pinMode(12, OUTPUT);
22. radio.begin();
23. radio.openWritingPipe(addresses[1]); // 00002
24. radio.openReadingPipe(1, addresses[0]); // 00001
25. radio.setPALevel(RF24_PA_MIN);
26. }
27.
28. void loop() {
29. delay(5);
30.
31. radio.stopListening();
32. int potValue = analogRead(A0);
33. int angleValue = map(potValue, 0, 1023, 0, 180);
34. radio.write(&angleValue, sizeof(angleValue));
35.
36. delay(5);
37. radio.startListening();
38. while (!radio.available());
39. radio.read(&buttonState, sizeof(buttonState));
40. if (buttonState == HIGH) {
41. digitalWrite(led, HIGH);
42. }
43. else {
44. digitalWrite(led, LOW);
45. }
46. }

Receiver Code

1. /*
2. * Arduino Wireless Communication Tutorial
3. * Example 2 - Receiver Code
4. *
5. * by Dejan Nedelkovski, www.HowToMechatronics.com
6. *
7. * Library: TMRh20/RF24, https://github.com/tmrh20/RF24/
This website
8. */ uses cookies to improve user experience. By using our website, you agree to our use of cookies.
9. Ok Read more (https://howtomechatronics.com/privacy-policy-page/)

https://howtomechatronics.com/tutorials/arduino/arduino-wireless-communication-nrf24l01-tutorial/ 10/45
7/8/2019 Arduino Wireless Communication - NRF24L01 Tutorial - HowToMechatronics
10. #include <SPI.h>
11. #include <nRF24L01.h>
12. #include <RF24.h>
13. #include <Servo.h>
14.
15. #define button 4
16.
17. RF24 radio(7, 8); // CE, CSN
18. const byte addresses[][6] = {"00001", "00002"};
19. Servo myServo;
20. boolean buttonState = 0;
21.
22. void setup() {
23. pinMode(button, INPUT);
24. myServo.attach(5);
25. radio.begin();
26. radio.openWritingPipe(addresses[0]); // 00001
27. radio.openReadingPipe(1, addresses[1]); // 00002
28. radio.setPALevel(RF24_PA_MIN);
29. }
30.
31. void loop() {
32. delay(5);
33. radio.startListening();
34. if ( radio.available()) {
35. while (radio.available()) {
36. int angleV = 0;
37. radio.read(&angleV, sizeof(angleV));
38. myServo.write(angleV);
39. }
40. delay(5);
41. radio.stopListening();
42. buttonState = digitalRead(button);
43. radio.write(&buttonState, sizeof(buttonState));
44. }
45. }

What’s di erent here from the previous example is that we need to create two pipes or
addresses for the bi-directional communication.

1. const byte addresses[][6] = {"00001", "00002"};

In the setup section we need to de ne both pipes, and note that the writing address at the
rst Arduino needs to be the reading address at the second Arduino, and vice versa, the
reading address at the rst Arduino needs to be the writing address at the second Arduino.

1. // at the Transmitter
2. radio.openWritingPipe(addresses[1]); // 00001
3. radio.openReadingPipe(1, addresses[0]); // 00002

This website uses cookies to improve user experience. By using our website, you agree to our use of cookies.
1. // at the Receiver
2. Ok Read more (https://howtomechatronics.com/privacy-policy-page/)
radio.openWritingPipe(addresses[0]); // 00002

https://howtomechatronics.com/tutorials/arduino/arduino-wireless-communication-nrf24l01-tutorial/ 11/45
7/8/2019 Arduino Wireless Communication - NRF24L01 Tutorial - HowToMechatronics
3. radio.openReadingPipe(1, addresses[1]); // 00001

In the loop section using the radio.stopListening() function we set the rst Arduino as
transmitter, read and map the value of Joystick from 0 to 180, and using the radio.write()
function send the data to the receiver.

1. radio.stopListening();
2. int potValue = analogRead(A0);
3. int angleValue = map(potValue, 0, 1023, 0, 180);
4. radio.write(&angleValue, sizeof(angleValue));

On the other side, using the radio.startListening() function we set the second Arduino as
receiver and we check whether there is available data. While there is data available we will
read it, save it to the “angleV” variable and then use that value to rotate the servo motor.

1. radio.startListening();
2. if ( radio.available()) {
3. while (radio.available()) {
4. int angleV = 0;
5. radio.read(&angleV, sizeof(angleV));
6. myServo.write(angleV);
7. }

Next, at the transmitter, we set the rst Arduino as receiver and with an empty “while” loop we
wait for the second Arduino the send data, and that’s the data for the state of the push button
whether is pressed or not. If the button is pressed the LED will light up. So these process
constantly repeats and both Arduino boards are constantly sending and receiving data.

That’s all, I hope you enjoyed this Arduino project (https://howtomechatronics.com/arduino-


projects/) and learned something new. Feel free to ask any question in the comments section
below. Also you can check out my DIY Arduino RC Transmitter
(https://howtomechatronics.com/projects/diy-arduino-rc-transmitter/) which is based on the
NRF24L01 module.

This website uses cookies to improve user experience. By using our website, you agree to our use of cookies.

Ok Read more (https://howtomechatronics.com/privacy-policy-page/)

https://howtomechatronics.com/tutorials/arduino/arduino-wireless-communication-nrf24l01-tutorial/ 12/45
7/8/2019 Arduino Wireless Communication - NRF24L01 Tutorial - HowToMechatronics

(https://howtomechatronics.com/projects/diy-arduino-rc-transmitter/)

JLCPCB – Prototype PCBs for $2 (For Any Color) & 24-Hour Lead Time
(https://jlcpcb.com)

China’s Largest PCB Prototype Enterprise, 600,000+ Customers & 10,000+ Online Orders Daily
(https://jlcpcb.com)

See Why JLCPCB Is So Popular: https://jlcpcb.com (https://www.youtube.com/watch?


v=_XCznQFV-Mw)

Arduino (https://howtomechatronics.com/tag/arduino/)

Communication (https://howtomechatronics.com/tag/communication/)

NRF24L01 (https://howtomechatronics.com/tag/nrf24l01/)

Wireless (https://howtomechatronics.com/tag/wireless/)

Тutorial (https://howtomechatronics.com/tag/tutorial/)

SHARE ON:

Share 169 Like 169

This website uses cookies to improve user experience. By using our website, you agree to our use of cookies.

Ok Read more (https://howtomechatronics.com/privacy-policy-page/)

https://howtomechatronics.com/tutorials/arduino/arduino-wireless-communication-nrf24l01-tutorial/ 13/45
7/8/2019 Arduino Wireless Communication - NRF24L01 Tutorial - HowToMechatronics

Save (https://www.pinterest.com/pin/create/button/?guid=A_bmP6V8oKvZ- 355

1&url=https%3A%2F%2Fhowtomechatronics.com%2Ftutorials%2Farduino%2Farduino-wireless-communication-nrf24l01-
tutorial%2F&media=https%3A%2F%2Fhowtomechatronics.com%2Fwp-content%2Fuploads%2F2017%2F02%2FArduino-
Wireless-Communication-NRF24L01-
Tutorial.jpg&description=Arduino%2BWireless%2BCommunication%2B%26%238211%3B%2BNRF24L01%2BTutorial)

Tweet

R E L AT E D P O S T S

CONTROL ANY ELECTRONICS WITH A TV REMOTE | ARDUINO IR TUTORIAL


(HTTPS://HOWTOMECHATRONICS.COM/TUTORIALS/ARDUINO/CONTROL-ANY-ELECTRONICS-WITH-A-TV-REMOTE-
ARDUINO-IR-TUTORIAL/)
(https://howtomechatronics.com/tutorials/arduino/control-any-electronics-with-a-tv-remote-
 Dejan (https://howtomechatronics.com/author/howtom12_wp/)
arduino-ir-tutorial/)

This website uses cookies to improve user experience. By using our website, you agree to our use of cookies.

Ok Read more (https://howtomechatronics.com/privacy-policy-page/)

https://howtomechatronics.com/tutorials/arduino/arduino-wireless-communication-nrf24l01-tutorial/ 14/45
7/8/2019 Arduino Wireless Communication - NRF24L01 Tutorial - HowToMechatronics

HOW TO BUILD AN ARDUINO WIRELESS NETWORK WITH MULTIPLE NRF24L01 MODULES


(HTTPS://HOWTOMECHATRONICS.COM/TUTORIALS/ARDUINO/HOW-TO-BUILD-AN-ARDUINO-WIRELESS-NETWORK-
WITH-MULTIPLE-NRF24L01-MODULES/)

 Dejan (https://howtomechatronics.com/author/howtom12_wp/)

 13 (https://howtomechatronics.com/tutorials/arduino/how-to-build-an-arduino-wireless-network-with-
(https://howtomechatronics.com/tutorials/arduino/how-to-build-an-arduino-wireless-network-
multiple-nrf24l01-modules/#comments)
with-multiple-nrf24l01-modules/)

HOW RFID WORKS AND HOW TO MAKE AN ARDUINO BASED RFID DOOR LOCK
(HTTPS://HOWTOMECHATRONICS.COM/TUTORIALS/ARDUINO/RFID-WORKS-MAKE-ARDUINO-BASED-RFID-DOOR-
LOCK/)

This website uses cookies to improve


 Dejan user experience. By using our website, you agree to our use of cookies.
(https://howtomechatronics.com/author/howtom12_wp/)

(https://howtomechatronics.com/tutorials/arduino/r
Ok d-works-make-arduino-based-r d-door-
Read more (https://howtomechatronics.com/privacy-policy-page/)
 38 (https://howtomechatronics.com/tutorials/arduino/rfid-works-make-arduino-based-rfid-door-
lock/#comments)
https://howtomechatronics.com/tutorials/arduino/arduino-wireless-communication-nrf24l01-tutorial/ 15/45
7/8/2019 Arduino Wireless Communication - NRF24L01 Tutorial - HowToMechatronics
lock/#comments)
lock/)

HOW TO USE A RGB LED WITH ARDUINO | TUTORIAL


(HTTPS://HOWTOMECHATRONICS.COM/TUTORIALS/ARDUINO/HOW-TO-USE-A-RGB-LED-WITH-ARDUINO/)

 Dejan (https://howtomechatronics.com/author/howtom12_wp/)
(https://howtomechatronics.com/tutorials/arduino/how-to-use-a-rgb-led-with-arduino/)

72 RESPONSES

Azhar February 18, 2017 (https://howtomechatronics.com/tutorials/arduino/arduino-


wireless-communication-nrf24l01-tutorial/#comment-1645)

Thank you for sharing this very useful tutorial. Can you help me with the code to control
More than one servo (I need to control 6 servo) using 6 potentiometer in one direction?

REPLY

Dejan Nedelkovski (https://howtomechatronics.com) February 20, 2017


(https://howtomechatronics.com/tutorials/arduino/arduino-wireless-communication-
nrf24l01-tutorial/#comment-1653)

This website uses cookies to improve user experience. By using our website, you agree to our use of cookies.

Ok Read more (https://howtomechatronics.com/privacy-policy-page/)

https://howtomechatronics.com/tutorials/arduino/arduino-wireless-communication-nrf24l01-tutorial/ 16/45
7/8/2019 Arduino Wireless Communication - NRF24L01 Tutorial - HowToMechatronics

Well this shouldn’t be a problem, you just have to send those potentiometer values to
the other Arduino and apply them to the servo motors. The same method would be
used.

REPLY

Chris Graves October 11, 2017


(https://howtomechatronics.com/tutorials/arduino/arduino-wireless-communication-
nrf24l01-tutorial/#comment-2534)

if you use a uno R3 board on the transmitter and receiver, what pins are you using for
your push button and joystick, LED, and servo. have to set it up to understand how it
works.
thanks,

REPLY

Dejan Nedelkovski (https://howtomechatronics.com) October 11, 2017


(https://howtomechatronics.com/tutorials/arduino/arduino-wireless-communication-
nrf24l01-tutorial/#comment-2536)

The important thing is that you need to use the SPI pins of the Arduino board for the
NRF24L01 module, or that’s the pins 13-SCKI, 12-MISO and 11-MOSI. For anything else,
you can use any pin.

manish December 19, 2017 (https://howtomechatronics.com/tutorials/arduino/arduino-


wireless-communication-nrf24l01-tutorial/#comment-2831)

don’t go by diagram for Nano audrino go by written pin connection for 13… its good
program… thanks to the programmer

This website uses cookies to improve user experience. By using our website, you agree to our use of cookies.
REPLY Ok Read more (https://howtomechatronics.com/privacy-policy-page/)

https://howtomechatronics.com/tutorials/arduino/arduino-wireless-communication-nrf24l01-tutorial/ 17/45
7/8/2019 Arduino Wireless Communication - NRF24L01 Tutorial - HowToMechatronics

Peyman (https://Non) March 15, 2017


(https://howtomechatronics.com/tutorials/arduino/arduino-wireless-communication-
nrf24l01-tutorial/#comment-1738)

Hi,how can send data for speci c pipe and get answer from it.
Master have one address and if send data all slave get,s it?
I wont have one master that get data from 2 slave.

REPLY

Terry Chen March 23, 2017 (https://howtomechatronics.com/tutorials/arduino/arduino-


wireless-communication-nrf24l01-tutorial/#comment-1789)

Hi, do you know any possible reason why my serial output is “yyyyyy yyyyyy yyyyy”???

REPLY

Dejan Nedelkovski (https://howtomechatronics.com) March 27, 2017


(https://howtomechatronics.com/tutorials/arduino/arduino-wireless-communication-
nrf24l01-tutorial/#comment-1809)

Might be your serial monitor baud rate, check whether it matches with the baud rate set
in the program.

REPLY

Jim April 12, 2017 (https://howtomechatronics.com/tutorials/arduino/arduino-wireless-


communication-nrf24l01-tutorial/#comment-1886)
This website uses cookies to improve user experience. By using our website, you agree to our use of cookies.

Ok Read more (https://howtomechatronics.com/privacy-policy-page/)

https://howtomechatronics.com/tutorials/arduino/arduino-wireless-communication-nrf24l01-tutorial/ 18/45
7/8/2019 Arduino Wireless Communication - NRF24L01 Tutorial - HowToMechatronics

Can I extend the range to 200 meters by using a repeater. Master to repeater (slave/master)
to other slaves and back?

REPLY

Dejan Nedelkovski (https://howtomechatronics.com) May 11, 2017


(https://howtomechatronics.com/tutorials/arduino/arduino-wireless-communication-
nrf24l01-tutorial/#comment-1990)

Could be possible.

REPLY

Azhar April 13, 2017 (https://howtomechatronics.com/tutorials/arduino/arduino-wireless-


communication-nrf24l01-tutorial/#comment-1888)

Hello, is your circuit diagram is wrong? The SCK of nrf2401 is not going to Pin 13 of arduino
nano.

REPLY

Jamaleddin March 3, 2019 (https://howtomechatronics.com/tutorials/arduino/arduino-


wireless-communication-nrf24l01-tutorial/#comment-5772)

Hi Mr. Dejan,
I have already implemented this project using two Arduino NANOs.
Initially it was not working but after several hours of inspections I got a very important
notice and would like to share it with all your follower. To get 2 NANOs wireless
connected and communicating then auxiliary SPI pins must be used instead of D11, D12,
and D13.
I nally got them working like dream. Thank you very much for sharing your lovely
This website uses cookies to improve user experience. By using our website, you agree to our use of cookies.
project. Cheers!
Ok Read more (https://howtomechatronics.com/privacy-policy-page/)

https://howtomechatronics.com/tutorials/arduino/arduino-wireless-communication-nrf24l01-tutorial/ 19/45
7/8/2019 Arduino Wireless Communication - NRF24L01 Tutorial - HowToMechatronics

REPLY

Annu April 26, 2017 (https://howtomechatronics.com/tutorials/arduino/arduino-wireless-


communication-nrf24l01-tutorial/#comment-1936)

Hi , It is a good one .
Can we use arduino nano , UNO.

REPLY

Dejan Nedelkovski (https://howtomechatronics.com) May 11, 2017


(https://howtomechatronics.com/tutorials/arduino/arduino-wireless-communication-
nrf24l01-tutorial/#comment-1982)

Thanks, you can use any Arduino.

REPLY

Nisaga July 31, 2017 (https://howtomechatronics.com/tutorials/arduino/arduino-


wireless-communication-nrf24l01-tutorial/#comment-2280)

if uno is used for transmitter, what are the replacement pins for 50,51,52 of the Mega?
Thanx

Dejan Nedelkovski (https://howtomechatronics.com) August 3, 2017


(https://howtomechatronics.com/tutorials/arduino/arduino-wireless-communication-
nrf24l01-tutorial/#comment-2287)

This Arduino Uno


website uses SPI pins:
cookies 10 (SS),
to improve user11 (MOSI), 12
experience. (MISO),
By using 13 (SCK).
our website, you agree to our use of cookies.

Ok Read more (https://howtomechatronics.com/privacy-policy-page/)

https://howtomechatronics.com/tutorials/arduino/arduino-wireless-communication-nrf24l01-tutorial/ 20/45
7/8/2019 Arduino Wireless Communication - NRF24L01 Tutorial - HowToMechatronics

Su Shah Hamid Jalali May 10, 2017


(https://howtomechatronics.com/tutorials/arduino/arduino-wireless-communication-
nrf24l01-tutorial/#comment-1970)

Your tutorials are just wonderful. I very much like the way you present them. Very clear and
very helpful. Keep up, man!!

REPLY

Dejan Nedelkovski (https://howtomechatronics.com) May 11, 2017


(https://howtomechatronics.com/tutorials/arduino/arduino-wireless-communication-
nrf24l01-tutorial/#comment-1972)

Thank you!

REPLY

Vitaly May 15, 2017 (https://howtomechatronics.com/tutorials/arduino/arduino-wireless-


communication-nrf24l01-tutorial/#comment-2006)

Hi. Wonderfull explanation. Q? Will system stand duplex if continuously move the joystick?
In this case the program will be inside the while() function all time.

REPLY

Dejan Nedelkovski (https://howtomechatronics.com) May 24, 2017


(https://howtomechatronics.com/tutorials/arduino/arduino-wireless-communication-
nrf24l01-tutorial/#comment-2046)

This websiteItuses
Thanks. cookieson
depends to improve user experience.
the situation By using
but it could our You
work. website,
canyou agreein
notice tothe
our introduction
use of cookies.

that I’m able to light


Ok up Read
the LED while moving the joystick.
more (https://howtomechatronics.com/privacy-policy-page/)

https://howtomechatronics.com/tutorials/arduino/arduino-wireless-communication-nrf24l01-tutorial/ 21/45
7/8/2019 Arduino Wireless Communication - NRF24L01 Tutorial - HowToMechatronics

REPLY

anil (https://marineanil123@gmail.com) June 9, 2017


(https://howtomechatronics.com/tutorials/arduino/arduino-wireless-communication-
nrf24l01-tutorial/#comment-2100)

Hi dejan
I have successfully trans communicated with mega 2560 to uno. … But my problem is the
connection is not lasting for long time ..its just working for few seconds and stopping…
Resetting on both boards Is also not working … When I disconnect two boards and connect
them to power supply again its working for few seconds… But working time is di erent in
each case….. Can you help me with this

REPLY

Dejan Nedelkovski (https://howtomechatronics.com) June 17, 2017


(https://howtomechatronics.com/tutorials/arduino/arduino-wireless-communication-
nrf24l01-tutorial/#comment-2134)

The problem might be the power. Try to use more stable external power. These wireless
module can be power hungry when transmitting data, so you might be losing the
connection. Also try yo use decoupling capacitors.

REPLY

jean-baptiste December 14, 2017


(https://howtomechatronics.com/tutorials/arduino/arduino-wireless-communication-
nrf24l01-tutorial/#comment-2811)

hi all!
This website uses cookies to improve user experience. By using our website, you agree to our use of cookies.

Ok Read more (https://howtomechatronics.com/privacy-policy-page/)

https://howtomechatronics.com/tutorials/arduino/arduino-wireless-communication-nrf24l01-tutorial/ 22/45
7/8/2019 Arduino Wireless Communication - NRF24L01 Tutorial - HowToMechatronics

rst, I want to congratulate dejan ’cause his tutos are wonderfull like sbdy say it before
me!

in second, I’d the same problem of function-malfunction after two or three times using
the joystick and it seems it was due cause using a non genuine uno.
when I change it for a genuine Arduino uno, the problem was solved… curious…

REPLY

kubajz 22 June 11, 2017 (https://howtomechatronics.com/tutorials/arduino/arduino-


wireless-communication-nrf24l01-tutorial/#comment-2111)

Well, I solved it by changing while (!radio.available()); to if (!radio.available());


works ne, good tut

REPLY

Dejan Nedelkovski (https://howtomechatronics.com) June 17, 2017


(https://howtomechatronics.com/tutorials/arduino/arduino-wireless-communication-
nrf24l01-tutorial/#comment-2132)

Great, thanks!

REPLY

Marek June 27, 2017 (https://howtomechatronics.com/tutorials/arduino/arduino-wireless-


communication-nrf24l01-tutorial/#comment-2157)

Excellent Tutorial, Thank you.


What resistor are you using in the second example though?
Thanks
This website uses cookies to improve user experience. By using our website, you agree to our use of cookies.

Ok Read more (https://howtomechatronics.com/privacy-policy-page/)


REPLY
https://howtomechatronics.com/tutorials/arduino/arduino-wireless-communication-nrf24l01-tutorial/ 23/45
7/8/2019 Arduino Wireless Communication - NRF24L01 Tutorial - HowToMechatronics

Dejan Nedelkovski (https://howtomechatronics.com) June 28, 2017


(https://howtomechatronics.com/tutorials/arduino/arduino-wireless-communication-
nrf24l01-tutorial/#comment-2161)

Thanks. The two resistors used in the second example are 220 Ohms.

REPLY

Eldon Tenorio July 10, 2017 (https://howtomechatronics.com/tutorials/arduino/arduino-


wireless-communication-nrf24l01-tutorial/#comment-2197)

Hi there!

I was able to make this project work. However, I am faced with an issue. Whenever I move
the two Arduino boards (each with the NRF24L01 module attached in them), the signal gets
lost. It was as if the modules can only work less than one meter in range? Unless I have
missed something from the tutorial.

Thanks in advance for the reply.

REPLY

Dejan Nedelkovski (https://howtomechatronics.com) July 15, 2017


(https://howtomechatronics.com/tutorials/arduino/arduino-wireless-communication-
nrf24l01-tutorial/#comment-2222)

Try to use decoupling capacitors or use an external power supply.

REPLY

This website uses cookies to improve user experience. By using our website, you agree to our use of cookies.

Ok Read more (https://howtomechatronics.com/privacy-policy-page/)

https://howtomechatronics.com/tutorials/arduino/arduino-wireless-communication-nrf24l01-tutorial/ 24/45
7/8/2019 Arduino Wireless Communication - NRF24L01 Tutorial - HowToMechatronics

Leo July 12, 2017 (https://howtomechatronics.com/tutorials/arduino/arduino-wireless-


communication-nrf24l01-tutorial/#comment-2208)

Thanks for the tutorial.

Do you have any ideas on how to establish a connection and receive data with a laptop
computer rather than a second arduino?

Thanks

REPLY

Dejan Nedelkovski (https://howtomechatronics.com) July 15, 2017


(https://howtomechatronics.com/tutorials/arduino/arduino-wireless-communication-
nrf24l01-tutorial/#comment-2220)

You can use a Bluetooth Module for that purpose. I already have a tutorial how to do it
using a Bluetooth module.

REPLY

Muditha September 4, 2017 (https://howtomechatronics.com/tutorials/arduino/arduino-


wireless-communication-nrf24l01-tutorial/#comment-2378)

Hello Dejan Nedelkovski


I read ” Arduino Wireless Communication – NRF24L01 Tutorial “. it is very useful for
beginners. Thanks lot.
My problem is, how can I nd ” nRF24L01.h” le ?

do you have a link for ” nRF24L01.h ? ”


thanks.

REPLY

This website uses cookies to improve user experience. By using our website, you agree to our use of cookies.

Ok Read more (https://howtomechatronics.com/privacy-policy-page/)

https://howtomechatronics.com/tutorials/arduino/arduino-wireless-communication-nrf24l01-tutorial/ 25/45
7/8/2019 Arduino Wireless Communication - NRF24L01 Tutorial - HowToMechatronics

Dejan Nedelkovski (https://howtomechatronics.com) September 11, 2017


(https://howtomechatronics.com/tutorials/arduino/arduino-wireless-communication-
nrf24l01-tutorial/#comment-2407)

The link is included in this article already. You can nd it right under the “Arduino Codes”
section.

REPLY

Levente Gulyas October 19, 2017


(https://howtomechatronics.com/tutorials/arduino/arduino-wireless-communication-
nrf24l01-tutorial/#comment-2565)

hello! great video! thank you for uploding, I have a problem my module doesnt recieve any
data(I’m using arduino nano as tranciever and uno as reciever).I checked the wiring many
times i tried it 100 ways to get it work but i haven’t succeeded yet.
Is there any oportunity with this library to check if the arduino can communicate with rf24 ?
I searched in the RF24.h and i found a bool ChipIsConnected() but it doesnt return anything.

REPLY

Dejan Nedelkovski (https://howtomechatronics.com) October 22, 2017


(https://howtomechatronics.com/tutorials/arduino/arduino-wireless-communication-
nrf24l01-tutorial/#comment-2576)

Try using a capacitor across the 3.3V and GND pins. The code library and the code I used
for in this project are working 100%.

REPLY

This website uses cookies to improve user experience. By using our website, you agree to our use of cookies.

Ok Read more (https://howtomechatronics.com/privacy-policy-page/)

https://howtomechatronics.com/tutorials/arduino/arduino-wireless-communication-nrf24l01-tutorial/ 26/45
7/8/2019 Arduino Wireless Communication - NRF24L01 Tutorial - HowToMechatronics

Ismaeil Alnaab December 1, 2017


(https://howtomechatronics.com/tutorials/arduino/arduino-wireless-communication-
nrf24l01-tutorial/#comment-2762)

I am facing the same problem, have you reached any progress?


I have tried to use 10 micro Farad capacitor, but nothing changed. I still receive nothing.

REPLY

wahid May 4, 2018 (https://howtomechatronics.com/tutorials/arduino/arduino-


wireless-communication-nrf24l01-tutorial/#comment-3545)

could be the distance between the two modules…it is almost 10 cm max, because of
the (PA _MIN).. try to bring them near to each others, or replace the _MIN with _LOW.
if you have a capacitor connected, just remove the line in both sketches.
Good luck

Mind October 24, 2017 (https://howtomechatronics.com/tutorials/arduino/arduino-


wireless-communication-nrf24l01-tutorial/#comment-2587)

Hi thank a lot for your example but i have a little problem maybe about the rf signal. i use
uno r3 as transceiver and nano as receiver when i upload the code the data normally send
and receive but after 30 sec it stop to send and receive the data could you pls help me out

REPLY

Dejan Nedelkovski (https://howtomechatronics.com) October 27, 2017


(https://howtomechatronics.com/tutorials/arduino/arduino-wireless-communication-
nrf24l01-tutorial/#comment-2605)

The problem might be in the power. Try to use a capacitor to stabilize the power supply
or try
This useuses
website an external
cookies topower
improvesupply.
user experience. By using our website, you agree to our use of cookies.

Ok Read more (https://howtomechatronics.com/privacy-policy-page/)

https://howtomechatronics.com/tutorials/arduino/arduino-wireless-communication-nrf24l01-tutorial/ 27/45
7/8/2019 Arduino Wireless Communication - NRF24L01 Tutorial - HowToMechatronics

REPLY

Aqsa naz November 10, 2017 (https://howtomechatronics.com/tutorials/arduino/arduino-


wireless-communication-nrf24l01-tutorial/#comment-2656)

Your example is really helpful but I am communicate both the nrf24L01 using getting
started example but I am receiving garbage value instead of hello world. What can I Do?

REPLY

Dejan Nedelkovski (https://howtomechatronics.com) November 10, 2017


(https://howtomechatronics.com/tutorials/arduino/arduino-wireless-communication-
nrf24l01-tutorial/#comment-2659)

Make sure they work at the same baud rate and your Serial monitor is set to the same
baud rate.

REPLY

Karen January 10, 2018 (https://howtomechatronics.com/tutorials/arduino/arduino-


wireless-communication-nrf24l01-tutorial/#comment-2919)

Hi, great tutorial, thank you! Is it possible to transmit from another source instead, say my
own sensor with a 2.4GHz antenna, transmitting an analogue frequency. Then just use one
Arduino and one nrf24I01 to receive and con gure the data? Or will this module only
communicate with another nrf24I01?

REPLY

This website uses cookies to improve user experience. By using our website, you agree to our use of cookies.

Ok Read more (https://howtomechatronics.com/privacy-policy-page/)

https://howtomechatronics.com/tutorials/arduino/arduino-wireless-communication-nrf24l01-tutorial/ 28/45
7/8/2019 Arduino Wireless Communication - NRF24L01 Tutorial - HowToMechatronics

Dejan Nedelkovski (https://howtomechatronics.com) January 17, 2018


(https://howtomechatronics.com/tutorials/arduino/arduino-wireless-communication-
nrf24l01-tutorial/#comment-2955)

No, they can only communicate to each other.

REPLY

Spog January 26, 2018 (https://howtomechatronics.com/tutorials/arduino/arduino-wireless-


communication-nrf24l01-tutorial/#comment-3002)

Thanks for such a great tutorial, I used the long range version of these to get about 400m
using external PSU to create a long range door bell with reply function.

REPLY

Max February 27, 2018 (https://howtomechatronics.com/tutorials/arduino/arduino-


wireless-communication-nrf24l01-tutorial/#comment-3176)

Many thanks for your great e orts, can i ask you how to do it if im using the HC 05 or HC 06
bluetooth moudles? im making an rc car and gured out how to drive the motors but i have
one sevo on front intended for steering how can i code it?

REPLY

Dejan Nedelkovski (https://howtomechatronics.com) February 27, 2018


(https://howtomechatronics.com/tutorials/arduino/arduino-wireless-communication-
nrf24l01-tutorial/#comment-3178)

Check my detailed Arduino Bluetooth Tutorial for the HC-05 Bluetooth module, you
might nd some useful information.
This website uses cookies to improve user experience. By using our website, you agree to our use of cookies.
REPLY Ok Read more (https://howtomechatronics.com/privacy-policy-page/)

https://howtomechatronics.com/tutorials/arduino/arduino-wireless-communication-nrf24l01-tutorial/ 29/45
7/8/2019 Arduino Wireless Communication - NRF24L01 Tutorial - HowToMechatronics

Andre May 7, 2018 (https://howtomechatronics.com/tutorials/arduino/arduino-wireless-


communication-nrf24l01-tutorial/#comment-3560)

Can we do the “Hello World” communication between two arduino in only one PC? means
it’s only has one IDE. can we?

REPLY

Dejan Nedelkovski (https://howtomechatronics.com) May 9, 2018


(https://howtomechatronics.com/tutorials/arduino/arduino-wireless-communication-
nrf24l01-tutorial/#comment-3577)

Yes you can do that. You just need to start the IDE two times, so you will have two
di erent IDE on which you can select the di erent ports to which your Arduino are
connected.

REPLY

theTechnowright June 29, 2018 (https://howtomechatronics.com/tutorials/arduino/arduino-


wireless-communication-nrf24l01-tutorial/#comment-3866)

I tried to make the nRF24l01 work, but the receiver code is just showing some random
symbols even if the serial monitor baud rate is same as the code. Can you please tell me
what might be the problem.
Thank you

REPLY

This website uses cookies to improve user experience. By using our website, you agree to our use of cookies.

Ok Read more (https://howtomechatronics.com/privacy-policy-page/)

https://howtomechatronics.com/tutorials/arduino/arduino-wireless-communication-nrf24l01-tutorial/ 30/45
7/8/2019 Arduino Wireless Communication - NRF24L01 Tutorial - HowToMechatronics

Dejan Nedelkovski (https://howtomechatronics.com) June 29, 2018


(https://howtomechatronics.com/tutorials/arduino/arduino-wireless-communication-
nrf24l01-tutorial/#comment-3869)

Try to use decoupling capacitors and try to place the transmitter and the receiver at
some distance, at least 1m.

REPLY

Engr.Shawkat Ali July 28, 2018 (https://howtomechatronics.com/tutorials/arduino/arduino-


wireless-communication-nrf24l01-tutorial/#comment-4005)

Excellent tutorial.
How can i communicate more then two Arduinos using NRf24L01. I am working on a
project where i have LCD with each arduinos and there is no concept of master-slave in it.
for example. Arduino A send message to arduino B and C and display that message on B
and C LCD. and then B or C reply to A And A show the message on LCD.
This project is based on consensus control of multi-agent systems where every agent is
responsible to control its own resources.

REPLY

Dejan Nedelkovski (https://howtomechatronics.com) August 1, 2018


(https://howtomechatronics.com/tutorials/arduino/arduino-wireless-communication-
nrf24l01-tutorial/#comment-4025)

Thanks! Check my other tutorial for making a wireless network with RF24Network library.

REPLY

Jepher August 22, 2018 (https://howtomechatronics.com/tutorials/arduino/arduino-


This website uses cookies to improve user experience. By using our website, you agree to our use of cookies.
wireless-communication-nrf24l01-tutorial/#comment-4146)
Ok Read more (https://howtomechatronics.com/privacy-policy-page/)

https://howtomechatronics.com/tutorials/arduino/arduino-wireless-communication-nrf24l01-tutorial/ 31/45
7/8/2019 Arduino Wireless Communication - NRF24L01 Tutorial - HowToMechatronics

Hi,

Thank you for your tutorial. It gives me an alternative for wireless communication between
devices.

May I know how can I increase the distance range, and does the devices need a direct line
of sight or is it possible to communicate even there is/are obstruction in between?

Thank you.

REPLY

Dejan (https://howtomechatronics.com) August 25, 2018


(https://howtomechatronics.com/tutorials/arduino/arduino-wireless-communication-
nrf24l01-tutorial/#comment-4166)

You can increase the range by using PA LNA SMA Antenna. And of course, the
communication is possible even if there are obstacles like walls, but in that way the
range will be decreased.

REPLY

Jepher August 31, 2018 (https://howtomechatronics.com/tutorials/arduino/arduino-


wireless-communication-nrf24l01-tutorial/#comment-4188)

Thank you, I have tried wireless connection using RF433MHz module. But when I try to
obstruct their line of sight. It can’t receive the signal of the transmitter.

I have a follow up question. Please do correct me if I’m wrong, I’m using Arduino Pro
Mini, the SPI pins will be; MOSI(11), MISO(12), SCK(13). Am I correct?

This website
Gerald uses cookies
December to improve
24, 2018 user experience. By using our website, you agree to our use of cookies.
(https://howtomechatronics.com/tutorials/arduino/arduino-
wireless-communication-nrf24l01-tutorial/#comment-5012)
Ok Read more (https://howtomechatronics.com/privacy-policy-page/)

https://howtomechatronics.com/tutorials/arduino/arduino-wireless-communication-nrf24l01-tutorial/ 32/45
7/8/2019 Arduino Wireless Communication - NRF24L01 Tutorial - HowToMechatronics

Thanks a lot for your work to stretch out the basic principles in an easy and comprehensive
way to everyone. Once again I used one of your great tutorials for the rst step to a new
topic before diving into depth and realizing my own thoughts and ideas. I really can
recommend your publications as a quick introduction to the “howto’s”.
Keep the ball rollin’…

REPLY

Dejan (https://howtomechatronics.com) December 25, 2018


(https://howtomechatronics.com/tutorials/arduino/arduino-wireless-communication-
nrf24l01-tutorial/#comment-5030)

Thank you so very much. I’m glad to hear this!

REPLY

sayan chowdhury December 28, 2018


(https://howtomechatronics.com/tutorials/arduino/arduino-wireless-communication-
nrf24l01-tutorial/#comment-5051)

Hi, Thanks for the video. I am facing an unusual problem. Here is part of the receiver code I
am working with. The “Available” string is getting printed , but there is no content in the text
variable. Its just blank. Please help

if (radio.available()) {
Serial.println(“Available”);
char text[32] = “”;
radio.read(&text, sizeof(text));
Serial.println(text);}

REPLY

This website uses cookies to improve user experience. By using our website, you agree to our use of cookies.

Ok Read more (https://howtomechatronics.com/privacy-policy-page/)

https://howtomechatronics.com/tutorials/arduino/arduino-wireless-communication-nrf24l01-tutorial/ 33/45
7/8/2019 Arduino Wireless Communication - NRF24L01 Tutorial - HowToMechatronics

Dejan (https://howtomechatronics.com) December 30, 2018


(https://howtomechatronics.com/tutorials/arduino/arduino-wireless-communication-
nrf24l01-tutorial/#comment-5073)

Hey, make sure you use a capacitors at the module VCC and GND and make sure you
send the same type of data as you are receiving. Also try to distance the two modules at
least a meter.

REPLY

wozu December 29, 2018 (https://howtomechatronics.com/tutorials/arduino/arduino-


wireless-communication-nrf24l01-tutorial/#comment-5060)

Hello
The rst example, writing “Hello World” works with out problem.
But the second example is not working for me. I don’t know the reason.
I checked my wiring of the led, servo and joystick but no connection error and tried multiple
time. But no receiving and transmitting. My rf module are very close to each other. When I
upload the code to UNO and MEGA the servo moves at end of code uploading. But when I
pus joystick and button nothing happens.
Is there any thing I need to consider?

REPLY

Dejan (https://howtomechatronics.com) December 30, 2018


(https://howtomechatronics.com/tutorials/arduino/arduino-wireless-communication-
nrf24l01-tutorial/#comment-5070)

Hey, what about capacitors, try to use capacitors near the modules VCC and GND and
distance a bit the two modules.

REPLY

This website uses cookies to improve user experience. By using our website, you agree to our use of cookies.

Ok Read more (https://howtomechatronics.com/privacy-policy-page/)

https://howtomechatronics.com/tutorials/arduino/arduino-wireless-communication-nrf24l01-tutorial/ 34/45
7/8/2019 Arduino Wireless Communication - NRF24L01 Tutorial - HowToMechatronics

wozu January 1, 2019 (https://howtomechatronics.com/tutorials/arduino/arduino-


wireless-communication-nrf24l01-tutorial/#comment-5096)

Thanks for your reply. The problem was one of the nrf24l01 module was not working
properly (it only receives, doesn’t transmit). It takes me long time to identify the
problem. I use another nrf24l01 and it works with out problem.

Vedat February 12, 2019 (https://howtomechatronics.com/tutorials/arduino/arduino-


wireless-communication-nrf24l01-tutorial/#comment-5577)

HI, this is exactly what i need for my DIY RC Plane. But I can’t get this to work with 2 arduino
unos. Does the board matter, I looked up the corresponding ICSP pins for the Uno boards, I
don’t know why it is not working. I would appreciate a helpful response, Thank You.

REPLY

Dejan (https://howtomechatronics.com) February 13, 2019


(https://howtomechatronics.com/tutorials/arduino/arduino-wireless-communication-
nrf24l01-tutorial/#comment-5591)

The boards doesn’t matter. Most of the time the problem is the powers supply. Make
sure you have good 3.3V power source, maybe even external one, and use bypass
capacitor for stabilizing it. Also try to distance a bit the two modules when
communicating.

REPLY

Ubaldo February 22, 2019 (https://howtomechatronics.com/tutorials/arduino/arduino-


wireless-communication-nrf24l01-tutorial/#comment-5664)

Congratulations my friend, your videos and explanations have helped and motivated an
immensity
This websiteofuses
students
cookies and professionals,
to improve thank
user experience. Byyou
usingfor
oursharing
website, your knowledge,
you agree to our usewe thank
of cookies.

you from the heart.Ok Read more (https://howtomechatronics.com/privacy-policy-page/)

https://howtomechatronics.com/tutorials/arduino/arduino-wireless-communication-nrf24l01-tutorial/ 35/45
7/8/2019 Arduino Wireless Communication - NRF24L01 Tutorial - HowToMechatronics

REPLY

Dejan (https://howtomechatronics.com) February 23, 2019


(https://howtomechatronics.com/tutorials/arduino/arduino-wireless-communication-
nrf24l01-tutorial/#comment-5675)

Thanks, I’m glad to hear that!

REPLY

Asif Anowar April 25, 2019 (https://howtomechatronics.com/tutorials/arduino/arduino-


wireless-communication-nrf24l01-tutorial/#comment-6320)

Thank you very much..I’ve just made the project using 2 UNO boards…Very nicely explained
….

REPLY

Dejan (https://howtomechatronics.com) April 26, 2019


(https://howtomechatronics.com/tutorials/arduino/arduino-wireless-communication-
nrf24l01-tutorial/#comment-6332)

Great, nice to hear that!

REPLY

Tanner May 1, 2019 (https://howtomechatronics.com/tutorials/arduino/arduino-wireless-


communication-nrf24l01-tutorial/#comment-6369)
This website uses cookies to improve user experience. By using our website, you agree to our use of cookies.

Ok Read more (https://howtomechatronics.com/privacy-policy-page/)

https://howtomechatronics.com/tutorials/arduino/arduino-wireless-communication-nrf24l01-tutorial/ 36/45
7/8/2019 Arduino Wireless Communication - NRF24L01 Tutorial - HowToMechatronics

Thanks for the tutorial. I was able to have it up and running in no time! I one question
though, so with the transmitter code I am useing a mega2560 as well, but I am trying use a
nano instead and whenever I put the pins that are normally on the 50, 51 and 52 pins of the
mega2560 and put them on like pins 13, 12 and 11 of the nano, even just the 13, 12 and 11
of the mega2560, it doesn’t work. For some reason they only work on pins 50, 51 and 52 for
the transmitter, any way I can x this?

REPLY

Dejan (https://howtomechatronics.com) May 1, 2019


(https://howtomechatronics.com/tutorials/arduino/arduino-wireless-communication-
nrf24l01-tutorial/#comment-6370)

The SPI pins of the Nano are SCK -13, MISO – 12, MOSI – 11. So if connected properly it
should work the same as with the Mega. And make sure you use a capacitor right next to
the module for stabilizing the power supply.

REPLY

Tanner May 2, 2019 (https://howtomechatronics.com/tutorials/arduino/arduino-


wireless-communication-nrf24l01-tutorial/#comment-6373)

I switched the pins to the ones you said to and it worked. Thanks again!

Ashish Bansal July 3, 2019 (https://howtomechatronics.com/tutorials/arduino/arduino-


wireless-communication-nrf24l01-tutorial/#comment-6970)

Hi
If for some reason ( like while using an Arduino motor shield) digital pins can be blocked.
The SIP pins are available on ICSP header and can be used there but can I use analog pins
like A0 and A1 for this line :
This website uses cookies to improve user experience. By using our website, you agree to our use of cookies.
RF24 radio(7, 8); // CE, CSN
Ok Read more (https://howtomechatronics.com/privacy-policy-page/)

https://howtomechatronics.com/tutorials/arduino/arduino-wireless-communication-nrf24l01-tutorial/ 37/45
7/8/2019 Arduino Wireless Communication - NRF24L01 Tutorial - HowToMechatronics

REPLY

L E A V E A R E P LY

Your email address will not be published.

Comment

Name* Email*

Website

S U B MIT

This website uses cookies to improve user experience. By using our website, you agree to our use of cookies.

Ok
(https://jlcpcb.com/)
Read more (https://howtomechatronics.com/privacy-policy-page/)

https://howtomechatronics.com/tutorials/arduino/arduino-wireless-communication-nrf24l01-tutorial/ 38/45
7/8/2019 Arduino Wireless Communication - NRF24L01 Tutorial - HowToMechatronics

L AT E S T

DIY ARDUINO GIMBAL | SELF-STABILIZING PLATFORM DIY ARDUINO BASED RC HOVERCRAFT


(HTTPS://HOWTOMECHATRONICS.COM/PROJECTS/DIY- (HTTPS://HOWTOMECHATRONICS.COM/PROJECTS/DIY-
ARDUINO-GIMBAL-SELF-STABILIZING-PLATFORM/) ARDUINO-BASED-RC-HOVERCRAFT/)
  Dejan  Dejan

(https://howtomechatronics.com/author/howtom12_wp/) (https://howtomechatronics.com/author/howtom12_wp/)

 2 (https://howtomechatronics.com/projects/diy-  9 (https://howtomechatronics.com/projects/diy-
arduino-gimbal-self-stabilizing-platform/#comments) arduino-based-rc-hovercraft/#comments)

POPULAR

Ul
Se
HC
SR
an
Ar
Tu
(h
se
hc
sr

(h


(h
se

(https://howtomechatronics.com/tutorials/arduino/ultrasonic-sensor-hc-sr04/)
This website uses cookies to improve user experience. By using our website, you agree to our use of cookies.

Ok Read more (https://howtomechatronics.com/privacy-policy-page/)

https://howtomechatronics.com/tutorials/arduino/arduino-wireless-communication-nrf24l01-tutorial/ 39/45
7/8/2019 Arduino Wireless Communication - NRF24L01 Tutorial - HowToMechatronics

Arduino Radar
Project
(https://howtomech
radar-project/)
 Dejan
(https://howtomec

 354
(https://howtomec
radar-project/#com

(https://howtomechatronics.com/projects/arduino-radar-project/)

(https://howtomechatronics.com/tutorials/arduino/how-to-control-stepper-motor-with-
a4988-driver-and-arduino/)

This website uses cookies to improve user experience. By using our website, you agree to our use of cookies.

Ok Read more (https://howtomechatronics.com/privacy-policy-page/)

https://howtomechatronics.com/tutorials/arduino/arduino-wireless-communication-nrf24l01-tutorial/ 40/45
7/8/2019 Arduino Wireless Communication - NRF24L01 Tutorial - HowToMechatronics

(https://howtomechatronics.com/tutorials/arduino/arduino-and-hc-05-bluetooth-module-
tutorial/)

Arduino TFT LCD Touch Screen Tutorial (https://howtomechatronics.com/tutorials/arduino/arduino-tft-lcd-touch-screen-


tutorial/)
 Dejan (https://howtomechatronics.com/author/howtom12_wp/)

 162 (https://howtomechatronics.com/tutorials/arduino/arduino-tft-lcd-touch-screen-tutorial/#comments)

This website uses cookies to improve user experience. By using our website, you agree to our use of cookies.

Ok Read more (https://howtomechatronics.com/privacy-policy-page/)

https://howtomechatronics.com/tutorials/arduino/arduino-wireless-communication-nrf24l01-tutorial/ 41/45
7/8/2019 Arduino Wireless Communication - NRF24L01 Tutorial - HowToMechatronics

(https://howtomechatronics.com/tutorials/arduino/arduino-tft-lcd-touch-screen-tutorial/)

F O L LO W M E !

Join My Newsletter!

Get noti ed when I publish new projects and tutorials straight to your inbox.

Enter you email

SUBSCRIBE

This website uses cookies to improve user experience. By using our website, you agree to our use of cookies.

Ok Read more (https://howtomechatronics.com/privacy-policy-page/)

https://howtomechatronics.com/tutorials/arduino/arduino-wireless-communication-nrf24l01-tutorial/ 42/45
7/8/2019 Arduino Wireless Communication - NRF24L01 Tutorial - HowToMechatronics

How To Mechatronics
24,776 likes

Like Page Share

Subscribe to my YouTube channel!

How To Mechatronics

YouTube 292K

C R E AT I V IT Y H E R O P R O J E CT

(https://creativityhero.com/diy-projects/diy-interactive-led-co ee-table/)

MY R E C O M M E N D AT I O N S

This website uses cookies to improve user experience. By using our website, you agree to our use of cookies.

Ok Read more (https://howtomechatronics.com/privacy-policy-page/)

https://howtomechatronics.com/tutorials/arduino/arduino-wireless-communication-nrf24l01-tutorial/ 43/45
7/8/2019 Arduino Wireless Communication - NRF24L01 Tutorial - HowToMechatronics

BEST ENTRY LEVEL OSCILLOSCOPES FOR BEGINNERS


AND HOBBYISTS 2019
BEST BUDGET FRIENDLY 3D PRINTERS FOR BEGINNERS
AND HOBBYISTS

(HTTPS://HOWTOMECHATRONICS.COM/TOOLS/BEST- (HTTPS://HOWTOMECHATRONICS.COM/TOOLS/BEST-
ENTRY-LEVEL-OSCILLOSCOPES-FOR-BEGINNERS-AND- BUDGET-FRIENDLY-3D-PRINTERS-FOR-BEGINNERS-AND-
HOBBYISTS-2019/) HOBBYISTS/)

 Dejan  Dejan
(https://howtomechatronics.com/author/howtom12_wp/) (https://howtomechatronics.com/author/howtom12_wp/)

BANGGOOD PRIME SALE

(https://howtomechatronics.com/recommends/banggood-prime-sale/)

H O W T O M E C H AT R O N I C S

HowToMechatronics is an education website in the area of Mechanical, Electrical and


Computer Engineering. Tutorials, Tips, Tricks, How It Works, Projects, Examples, Source Codes,
Download les and much more can be found here.

F O L LO W H O W T O M E C H AT R O N I C S O N S O C I A L M E D I A
This website uses cookies to improve user experience. By using our website, you agree to our use of cookies.

Ok Read more (https://howtomechatronics.com/privacy-policy-page/)

https://howtomechatronics.com/tutorials/arduino/arduino-wireless-communication-nrf24l01-tutorial/ 44/45
7/8/2019 Arduino Wireless Communication - NRF24L01 Tutorial - HowToMechatronics

(https://www.facebook.com/howtomechatronics)
(https://plus.google.com/+Howtomechatronics)
(https://www.youtube.com/user/DejanNe

D I S C LO S U R E

HowToMechatronics is a participant in the Amazon Services LLC Associates Program, an


a liate advertising program designed to provide a means for sites to earn advertising fees by
advertising and linking to Amazon.com

Copyright © 2019 HowToMechatronics.com. All rights reserved. Terms and Conditions


(https://howtomechatronics.com/disclaimer/) | Privacy Policy (https://howtomechatronics.com/privacy-policy-page/)

This website uses cookies to improve user experience. By using our website, you agree to our use of cookies.

Ok Read more (https://howtomechatronics.com/privacy-policy-page/)

https://howtomechatronics.com/tutorials/arduino/arduino-wireless-communication-nrf24l01-tutorial/ 45/45

Das könnte Ihnen auch gefallen