Você está na página 1de 46
How To CHAT US = You WHATS NEW? —+ Moats Sein War 2 iia tectonic O ;psulhontomechatronics.com) (Otins:www youtube com/user/DejanNedelkovski) G+ txnps vous qooole.com/+Howtomechatronics) Fetus f ics) Follow me on: 0) Japsanerssiesco) ) tists thawrecaraniscomasearybteh > Anno Tul st Mewsmssnaoiescnaega sa NRF24L01 and Arduino Wireless Communication = Complete Guld In this Arduino tutorial we will learn how to make a wireless communication between twe Arduine boards using the NRF24L0" transceiver module. You can watch the following video or read the written tutorial below. ‘Arduino Wireless Communication ~ NRF24L01 Tutorial overview For explaining the wireless communication we will make two examples, the fist one wil be sending a simple “Hello World” message from one Arduino to another, and in the second example we will have a biirectional communication between the Arduino boards, where using the Joystick at the first ‘Arduino we will control the serve motar atthe second Arduino, and vice versa using the push button atthe second Arduino we will control the LED at the first Arduino, -thatpstéhowtomechatronics.comhw: « 26 0 ion-Complete.GuideTurarial pg) NRF24L01 Transceiver Module How it Works Lets take a loser look at the NRF24LO1 transceiver module, It uses the 2.4 GHz band and it can operate with baud rates from 250 kbps up to 2 Mbps. Ifused in open space and with lower baud rat its range can reach up to 100 meters, ‘The module can use 125 different channels which gives a possibilty to have a network af 125 independently working modems in one place. Each channel can have up to 6 addresses, or each unit can communi ce with up to 6 other units at the same time Ce Bal NRF2ALO1 { nar2avo | pt Cay 2400102525 Mie ‘ie spacing- 125 channels = = ‘The power consumption of this module is just around 12mA during transmission, which is even ower than a single LED. The operating voltage of the ‘module is from 1.3 to 3.5V, but the goad thing is thatthe other pins tolerate SV logic, so we can easily connect itt an Arduino without using any loge level converters ‘Three of these pins are for the SPI communication and they need to be connected ta the SPI pins ofthe Arduino, but note that each Arduina board has different SPI pins, The pins CSN and CE can be connected to any digital pin ofthe Arduine board and they are used for setting the module in stancby lor active mode, as wel as for switching between transmit or command mode. The las pn fs an interrupt pin which doesnt have ta be used, ‘There are several variations of the NRFZ4LO1 modules, The most popular isthe ane with on-board antenna, This makes the module to be more ‘compact, ut on the ether hand, lowers the transmission range toa distance of about 100 meters. ae eed eee g content/uploads/2017/02/Various-modules-based-on-the.NRF24L0"-chip jpg) hatronics comiwp: ‘The second variation, instead of on-board antenna, it has a SMA connector and which we can attach a duck antenna for better transmission range. ‘The third variation shown here, in addition tothe duck antenna, it has @ RFX2401C chip which includes PA (Power Amplifier) and LNA (Low-Noise “Amplifier, This amplifies the NRFZ4LO1 signal and enables even better transmission range of up to 1000 meters in open space NRF24101 Modul Pinout Here's a detalles look at the NAF24L01 pinout, a5 well as the NRF24LO1+ PAYLNA madule, ez Wize aes Cc to Bead er (itpsishowtomechatronics.com/a- ntent/uploads/2017/02/NREP4 1. Pinout NRE?4L01-PAANA.ong) Both modules, the NRF24LO1 and the NRF24LOT+ PA/LNA have the same pinout, so we can connect them in eur circuit the samme way. Here's how we need to connect the NRF24L01 modules to the Arduino boards. ‘Arduino Mega NRF24LO1 33V-vec GND-GND 8-CSN 7 52-ScK 51-MOSI 50-MiSO [Arduino Uno/ Nano - NRF24L01 33V-VCC GND-GND ‘8-CSN 7 13-5ck 11-MOst 12-MIsO i "2/02/NRE2AL 1 -and-Arduino- ‘As | already mentioned, each Arduino board has diferent SPI pins, so keep that in mind when connecting the modules o your Arduino board. Cetera K Miso MOsi ‘You can get the components needed for this Arduino Tutorial from the links below: + NRF24L01 Transceiver Module... Amazon (https//amzn.to/20¢84e}) / Banggood omechatronics.com/recommends/nrf24101- + Arduino Board ‘Amazon (https://amzn.to/2CedSKC) / Banggood (https://nowtomechatronics.com/recommends/arduino- ‘Amazon (https://amzn to/2LYGiLy) / Banggood 1nd-jump-wires-banggod/) + Bresdboard and jump Wires. ronics.com/recommend: Disclosure: These are afiiae links. As an Amazon Associate | ear from qualifying purchases [Arduine and NRF24101 Code ‘once we connect the NRF24L01 modules to the Arduino boards we are ready to make the codes for both the transmitter and the recever First we need to download and instal the RE24 library (hitos-//ethub com/tmrh2O/RF24/ which makes the programming less difficult, Here are the two codes for the wireless communication and below isthe description of thern ‘Transmitter Code Receiver Code BL Gualeceeareeeentagtio Description: So weneed to include the basic SPI and the newly installed RF24 ibraries and create an RF24 object. The two arguments here are the CSN and CE pins. Next we need to create a byte array which will represent the address, or the so called pipe through which the tw modules will communicate, We can change the value of this address to any letter string and this enables to choose to which receiver we wil alk, so in our case we will have the same address at both the receiver and the transmitter. In the setup section we need to initialize the radio object and using the racio.operWringPiped function we set the address of the receiver to which we vill end data, the 5 letter string we previously set. (On the other sie, at the receiver, using the radio.setReadingPipe( function we set the samme address and in that way we enable the communication between the wo modules. ‘Then using the radio.setPALevel function we set the Power Amplifier level in our case Il seit to minimum as my modules are very close to each other. Note that ifusing a higher level itis recommended to use a bypass capacitors across GND and 3.3V ofthe modules so that tiey 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 startistening() function ibich sets the module as recever Inthe loop section, a the sransmitter, we create an array of characters to which we assign the message “Hello World’, Using the radio.writeQ function ‘we wil send that message tothe receiver. The first argument here is the variable that we want to be sent. By using the "8" before the variable name we actually et an indicating of the variable thst stores the data that we want tobe sent and using the second argument we set the number of bytes that we want to take from that variable, In ths case the sizeo function gets all bytes of the strings “ext” Atthe end of the program we will add 1 second delay (On the other side, at the receiver, inthe loop section using the radio.avalabled function we check whether there is data to be received, If thats ‘rue, ‘rst we create an array of 32 elements, called "tex, n which we will save the incoming data Using the radion.readp function we read and store the data into the “text” variable. A the end we ust print text onthe serial monitor. So once we Upload both programs, we can run the serial monitor atthe recetver and we will notice the message "Hello World” gets printed each second, “Troubleshooting It’s worth noting chat power supply noise is one of the most common issues people experience when trying to make successful communication with ‘the NRF24L01 modules. Generally, RF circuits or radio frequency signals are sensitive to power supply nase, Therefore, i's always a goad idea to Inchide a decoupling capacitor across the power supply line. The capacitor can be anything from tOuF to 100uF. Es External Power Supply Ahitas:Jhowtomechatronics.com/w: ‘contentJuploads/2017/02/NRF24101 Troubleshoating-ecoupling-canacitor-and-external-pawer-sunaly. ROE) "Another common issue is thatthe 3.3 pin ofthe Arduino beards, cannot always supply enough power to the NRF24L01 module. So, powering the ‘module with an external power source is also a good idea. _Ardaine Wireless Bt-drectonal Communiaton with two NRFZALOT modules Lets see the second example, a bi-directional wireless communication between two Arduino boards. Here's the circu schematics: trivzing ‘You can get the components needed for this example from the links below: + NRF2AL01 Transceiver Module....... Amazon (https://amzn.to/20¢84s)) / Banggood (https:/Jhowtomechatronics.com/recommends/nrf24101-banggood/) + Arduino Board ‘Amazon (https://amzn.t0/2FZ0300) / Banggood ote sJhowtomechatronics.com/recommends/arduino-nano-banggood/) + Joystick Module ‘Amazon (https://amz.to/2VrBAUA) / Banggood (hispsi//howtomechatronics.com/recommends/jaystickchanggood/) + Servo Motor ‘Amazon (https://amzn.to/2V9PERR) / Banggood (hesps:/howtomechatronics.com/recommends/micro-servo-motor-banggood/) + Pushbutton ‘Amazon (https//amzn.to/2LTW70e) / Bangzood (hetpss//howtomechatronics.com/recommends/push-button-momentary:banggood) + uD ‘Amazon (https://amzn to/386ghdG) / Banggood (https:/Jhowtomechatronics.com/recommends/leds- banggood/) Disclosure: These are afitae links. Asan Amazon Associate | earn from qualifying purchases =m) See.lso ple NRE24L01 Modules (https howtomechatronics.com/tutorials/arduino/how-to-bulld-an-ardulno-wireless-network-with-mmultiple-nrf24l01-modules/) soures Code Here ate the (wo codes and belowis the description of them. ‘Transmitter Code Receiver Code |What's alferent here from the previous example Is that we need to create two pipes or addresses for the b-drectional communication, In the setup section we need to define both pipes, nd note thatthe writing address atthe first Arduino needs tobe the reading address at the second ‘Arduino, and vice versa the reading address at the frst Arduino needs to be the writing address atthe second Arduino. 2. losopaneettdngnpetasiceases 611) (00082 In the loop section using the radio stoplistening0) function we set the frst Arduino as transmitter, read and map the value of Joystick from 0 t0 180, and using the racio,write function send the data to the receiver. 1 eset atophiaanteg 2 ih potvatan = ancoghandats Cn the other side, using the radio.startListening0 function we set the second Arduino as recever and we check whether there is available data, While there is data available we will read i, save it to the “angleV” variable and then use that value fo rotate the servo moter. Next, at the transmitter, we set the first Arduino as receiver and with an empty ‘while loop we walt for the second Arduino the send data, and thats ‘the data forthe state ofthe push button whether is pressed or not I the button is pressed the LEO wil light up. So these process constantly repeats and both Arduino boards are constantly sending and receiving data More NRFZ401 and Arduino examples ‘The NRF24L0" module is @ must-have for any Arduino enthusiast, | have already used the NRF24L01 module in mary of my Arduino (butnsushowtomechatronics.com/arduino-projects), Here | wil ist all of my projects in which Ihave used these modules. “Transceiver Modules 4103 and H + Arduino Robot Car Wireless Control using HC.0S Bluetooth, Ni (tpsxthowtomecnatronies com/tutorialsvarduino/arduino-rabot-car-wireless-control- using h.0S-blvetoath-nef24I01-and-he-tZaranscever. modules) * Acduino Wireless Weather Station Project (hitns1/howtomechatranics com/tutoralsarduino/arduino.wicelesseather-station-praject) © DIV Arduino RC Teansmitter (ni Arduino Ant Hexapod Robot (htsps/¢howtamechatronics.cam/prajects/ardina-ant-hexapod.rabot/) ssHthowtorn atronics.comMprojects/dy-arduino-rctransmitter + DIV Arduino based RC Hovercraft hitesd/howtomechatronics com/ptojectedyarcuino-baced-rchovercral) + Arduino Mecanum Wheels Robot (htins./howtamechatranics.com/projects/arduino-rnecanum.wheels.rabat/) + DIV Arduino RC Receiver for RC Models and Arduino Projects (https//howtamechatronics.com/projets/diy-arduino.re-eceive + Arduino 8¢ Airolane | 100% DI (htes//nowtomechatronics com/orojects/arduino-rcaiplane.ay/) Each ofthese projects/tutorals has a detailed explanation how to use the NRF24L01 module, including circuit diagrams, improved code Implementation for better communication and so on, ‘hitasWhowromechatronies com/orojectsidly.ardulno-rc- ansmites/) DIY Arduino RC Transmitter Example That's all for this tutorial, Ihope you enjoyed it and learned something new. As always, fel free to ask any question in the comments section below. See a sina (nipsibontomeh ul oatinn sii batonie cmt eaiann AEM upsthowtomecbelonecomiasiorBAlNi Yeles hpsvawtomesnsstancscomagimireese “utonaltins/thomamechatrnic.com/bestutaral RELATED POSTS 1) bf Camera Slider Dejan Nedelkovski(htns/nowtomechatronics.com) February 20,2017 (htinsJ¢howtomechatronics.comn/wtoralvarduino/arduine wires ‘comnmunication.ar74l01.tutoriatcornment.1653) ‘Wel this shouldn't be a problem, you just have to send those potentiometer values tothe other Arduino and apply them to the servo motors. The same method would be used. Chris Graves October 11,2017 (httas:/nowtomechatronics.com/tutorals/arduino/ardulno-wireless-communication-nrf24I0|-tutoriaUitcomment 2530) 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 Ieup to understand how ie works, thanks, Dejan Nedeihovsa(trps/howtomechatronis.com) October 11,2017 (https:1/hovtomechatronies.com/tutorials/arduinolarduino-wireles ‘communieation-nv#74io}-cutoria#comment. 2536) ‘The important thing is that you need to use the SPI pins ofthe Arduino board for the NRFZALO1 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:/showtomachatronics.com/tutarials/arduina/arduino-wireless-communication-nef24I01-tutorial#comment 2a ‘dont go by diagram for Nano audrino go by written pin connection for 13.. its good program... hanks to the programmer Peyman thtips//Non) March 18, 2017 https:/howtomechatronics.comtutorials/arduino/arduino-wireless-communication-nef24I01- sutoriav#comment-1738) Hihow can send data for specifi pipe and get answer from Master have one address and if send data al slave get. it? | wont have one master that get data from 2 slave. Terry Chen March 23, 2017 (hstos://howtomechatronics,comm/tutorials/arduinoarduyino-wirelese-communication-arf24I0|sutorial#camment-1789) Hi,do you know any possible reason why my serial output is “ny Wry Wy??? Dejan Nedelkovski (htns/nowtomechatronics.com, March 27, 2017 (ntpsi//howtomechatronics com/tutorlas/atduino/arduino.wireless, communication.nrf24101-tutoriavtcomment.1809) Might be your serial monitor baud rate, check whether It matches with the baud rate set in the program, Jim br 12.2017 (utepsiJhowtomechatranicscom/tutorals/ardulno/ardulno.wirel lcation-nrf24101-tutorial¥camment.18 Can extend the range to 200 meters by using a repeater. Master to repeater (slave/master) to other slaves and back? REPLY Dejan Nedelkovskihtps/howtomechatronics.com) May 11, 2017 (hxtpsi//howtomechatronis com/tutorals/arduino/arduino-wireless cotrmnunication-nrf24I01-tutoriaétcommment-190) Could be possible ‘Aahar spril13, 2017 (heos:tthowtemechatronics.com/tutorlals/arduino/arduinoswireless-communication-nrf24l01-tutorial#tcomment-1888) Hello, is your circuit diagram is wrong? The SCK af nrf2401 is not going to Pin 13 of arduino nano. Jomateddin March 3,2019 (btips/hontomechatronics.com/tutorials/arduina/arduino-wireless-communicat n-nef24l01 tutorialteomment-S772) HiMe, Dejan, | nave already implemented this project using two Arduino NANOS, Initially it was nat working but after several hours of inspections I gota very important notice and would like to share it with allyour follower. To [Bet 2 NANOS wireless connected and communicating then auxiliary SPI pins must be used instead of 011, D12, and D13. | finally got them working lke dream, Thank you very much for sharing your lovely project. Cheers! ‘Annu April26, 2017 (nips: /fhowtomechatronics com/tutorials/arduino/arduino-wiraless-commmunication-nrf74l01 tutorial/#comment-1936) Hi, [tis a good one Can we use arduino nano, UNO. Dejan Nedelkovski https: /Hhowtomechatronics.com) May 11, 2017 https./Jhowtomechatranics,com/tutorals/arduino/ardulno-wirels unication-nr{24101-tutorialteomment-982) ‘Thanks, you can use any Arduino. ‘Nisoga july 31,2017 (https://howtomechatronics.com/tutorials/arduina/arduino-wireless-communication-nr 2410" tutorial#comme uno is used for transmitter, what are the replacement pins for $,51,52 of the Mega? ‘Thanx Dejan Nedeihovsi(ttps/howtomechatronics.com) August 3, 2017 [https//howtomechatronics.com/tutorals/arduino/arduino-wireless- sori #eomment-2287) ‘Arduino Uno SPI pins: 10 (SS), 11 (MOSH, 12 (MISO), 13 (SCK) Sufi Shah Homid oll May 10, 20 utoria#comment-1970) psvJhowtomechatronics.com/tutorials/arduino/arduino-wireless-commmunication-nef2A Your tutorials are just wonderful. Ivery much ike the way you present them, Very clear and very helpful. Keep up, mani! Dejan Nedelkovskihttps/howtomechatronics.com) May 11, 2017 (https:/Jhowtomechatranic.com/tutorals/arduino/arduino-wireless communication-nrf24101-tutoriavteomment-1972) ‘Thank you! Vitaly May 15,2017 (https Jthoutemechatronics com/utarialsfarduina/arduine-wireless-communication-nvi24i0t-tutoriaV#tcamment.2006) Hi. Wonderfull explanation. Q? will systern stand duplex if continuously move the joystick? In tis case the program willbe inside the whileQ function alltime, Dejan Nedelkovski(htns/nowtomechatronic.com) May 24, 2017 (hitps.//howlomechatronics com/tusorals/arduino/arduino-witeless ‘communication-ar4l0 tutorial #eamment-2048) Thanks. t depends on the situation but t could work. You can notice Inthe introduction that fr able to ight up the LED while moving the Joystick. nl btips/marineanl123@¢malLcom) june 9,017 (hisps.lfhowtomechatronics com/tutorials/arduino/ardulno.wiel ication-nrf24101 sutorialécomment-2100) Mi dejan "pave successfully vans communicated with mega 2560 to uno. .. But my problem is the connection isnot lasting for long time .\ts just working for few seconds and stopping... Resetting on both boards ts also not working. When disconnect two boards and connect them to power supply again Its working for few seconds... But working tine is diferent in each case... Can you help me with this Dejan Nedelkovsh(htns/Mnowtomechatranic.com, june 17.2017 (nites Whowtomechatvonics.comp/tutarlals/arduino/arduina-wirel oonmunication-nrf24I01-tutorialsconmment-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. Jean boptste December 14,2017 (btips.Jhawtomechatranics com/tutorials/arduino/arduino.wieless-communication-nef2él01- tutorial#tcornment.2813) alt first, Iwant to congratulate dejan cause his tutos are wonderfull ke sbdy say it before me! In second, the samme problem of function-malfunction after two or three times using the joystick and It seems it was due cause using a non -enuine uno. ‘when change itfor a genuine Arduino uno, the problem was solved... curious. kubajg 2 une 11,2017 (ntps/Jhowtomechatranic,com/tutorials/arduinolarduino-wireless-communication-nrf24)0|-tutaraltcomment-2111) Well, solved itby changing while (radio.avalableg); to if (radio avallable): works fine, good tut Dejan Nedelkovski(htns/nowtomechatronics.com, june 17,2017 {nites W/howtomechatvonics.com/tutorials/arduino/arduine-wirl communication-nrf24l01-tutoriay#eomment-2132) Great, thanks! Morek une 27.2017 (nttpsuthoutemechatronlcs com /utorias/arduino/arduineswlreless.communication-nrf2él01-tutorialitcomment-2157) Excellent Tutoral, Thank you. What resistor are you using in he second example though? Thanks REPLY eign 1 tpsLthowtomechate ) June 28, 2017 (nts. howtomechatranics com/utorlals/arduino/ardulnos ‘communication. 24l0 .tutorial#comment. 2161) ‘Thanks, The two resistors used in the second example are 220 Ohms. REPLY Eldon Tenorio July 19. 2017 nitps/Jhowlomechatronics com/tutovalsard lon nr 24101 sutoriay a Hi there! | was able to make this project work. However, | am faced with an issue. Whenever I move the two Arduino boards (each with the NRFZALOT module attached in them), the signal gets lost was asi the modules can only work less than one meter in range? Unless | have missed something from the tutorial. “Thanks in advance for the reply. Dejan Nedelkouskihtps:/showtomechatronics.com) july 15,2017 (https://howtemechatronics com/tutorlals/arduino/arduino-witeless- communication-nrf24l01-tutorial#tcomment-2222) Try to use decoupling capacitors or use an external power supply, Leo july 12,2017 (hips: howtomechstronics com/tutorialserduino/arduine.wireless-communication-rvf24l01 tutorial/#eomment-2208) Tranks for the tutorial Do you have any ideas on how to establish a connection and recelve data with alaptop computer rather than 2 second arduino? Thanks REPLY Dejan Nedelkovski htps/Mhowtomechatronis.com) july 18,2017 (https://nowtomechatronics com/tutorlals/arduino/arduino-wireless- communication-nrf24l01-tutorial#tcomment-2220) You can use a Bluetooth Module for that purpose, | already have a tutorial how to do it using 2 Bluetooth module, Muditha Seotember 4, 2017 (hitos/showtomechatronics.com/tutorials/arduino/arduino-wireless-commurication-nrf24l0|-tutoria#tcornment-2378) Hello Dejan Nedelkovski I read” Arduine Wireless Communication ~ NRF24L01 Tutorial. itis very useful for beginners. Thanks lt. ‘My problem is, how can find" nRF24101 hfe? ddo you have link for nRF24LO1.N ?* thanks REPLY Dejan Nedelkovsh (hteshowtomechate 2) September 11.2017 (nitpsW/howtamechatroples com /tutorials/arduino/arduinaswirl ommmunication-nrf24I01-tutorial#comment-2407) ‘The links included in this article already, You can find it right under the “Arduino Codes” section, REPLY Levente Gulyas Octeber 19, 2017 (bttasuihowtonn torlalsardulna/arduino wireless communiation-nrf24l0§ auroral 25089) hello! great video! thank you for uploding, have a problem my module doesnt recleve any data(tm using arduino nane as tranciever and une 2s reciever). checked the wiring many times tried it 100 ways to gett work but i haven't succeeded yet. Is there any opertunty with this library to check if the arduino can communicate with f24 ? | searched in the RF24.h and i found a bool CChiptsConnected but it doesnt return anything, REPLY Dejan Nedelkovshi htps/#howtomechatronis.com) October 22, 2017 (hitps/showtomechatronics.com/tutovials/arduino/arduino-wireless: ‘sommunication-ar24l01tutorialécomment- 257) “Try using a capacitor across the 3.3V and GND pins, The code library and the code | used for in this project are warking 100%, Ismael Alnaab December 1,20) howtomechats futovals/arduinovacds ess. slon-nri2al0 tutorial#cormment.2762) |am facing the same problem, have you reached any progress? [have tried to use 10 micro Farad capacitor, but nothing changed. stil receive nothing. REPLY Wahid May 4, 2078 (htips/Mnowtemechatronies.com/tutorials/arduino/arduinosyireless-communication-nrf24101-tutoral#tcomment-3545) «ould be the distance between the two modiles.it is almost 10 cm max, because ofthe (PA MIN}. try to bring thern near to each others, of replace the _MIN with LOW, if you have a capacitor connected, just remave the tine in both sketches, Good luck Mind October 24.2017 (hitpsldhowtamechat futoralsara lon-nrf24)01 utara 1.258) Hi thank. lot for your example but have alte problem maybe about the rf signal. use uno r3 as transceiver and nano as receiver when | upload the code the data normally send and receive but after 30sec it stop to send and receive the data could you pls help me out REPLY Dejan Nedelkovskihtps/Mhowtomechatronics.com) October 27,2017 (hitps/showtomechatronics.com/tutovials/arduino/arduino- wireless: communication-nrf24l01-tutorial#tcomment-2605) ‘The problem might be in the power. Try to use a capacitor to stabilize the power supply or try use an external power supply. ‘Agsa naz Novernber 10,2017 (nttps:/showtomechatronics.comMtutorialsarduino/arduine-wirelass-communication-nrf24I0 tutorialltcomment 2650) Your example is really helpful but lam communicate both the nrf24L01 using getting started example but |am receiving garbage value instead of hello world, What can 1 Do? Dejan Nedelkovski https /thowtomechatronics.com) November 10, 2017 (httos://howtomechatronis.com/tutorals/arduino/arduino-wireless- communication-nrf24101-tutoriav#tcomment-2659) Make sure they work atthe same baud rate and your Serial monitor is set to the same baud rate. aren January 10, 2018 (tps:/nowtomechatranics com/tutorisle/arcuino/arduino-wieless-commurication-nef24I0|-tutoialtcommert-7019) Hi, great tutorial, thank you! Is possible to transmit from another source instead, say my own sensor with @ 2.4GHz antenna, transmitting an analogue frequency. Then just use one Arduino and one nrf24I01 to receive and configure the data? Or wil this module only communicate with another arf2aior? Dejan Nedelkovsk https /Mhoutomechatronic.com)Jaruary 17, 2018 (https//nowtomechatronics,com/tutarals/arduino/arduino-wreless- ommmunication-nr{24)01-tutorial#tcomment-2955) No, they can only communicate to each other. Spog January 26, 20'S (prps/Jhowtomechatronics com/tutorials/ardulno/arduino-wireless-communication-nef24l0|-tutorial#comment-3002) ‘Thanks for such a great tutorial, | used the long range version of these to get about 400m using external PSU to create along range door bell with reply function, Max Eebruary 27,2018 (hisps.//howtemechatronics.com/tutorials/arduina/arduino-wireless-communication-nr 2401 -tutorial/#tcomment-3176) ‘Many thanks for your great efforts, can ask you how to do itm using the HC 05 or HC 06 bluetooth moudles? im making an rc car and figured out hhow to drive the motors but have one sevo on front intended for steering how can i code I? Dejan Nedelkovski(htns/mowtomechatronics.com) February 27, 2018 (https /¢howromechatronics com /ttorials/ardulno/arduine-wirels ‘communication-nrf24l01-tutoriav#eomment-3178) CCheck my detaled Ardulno Bluetooth Tutorial fr the HC-05 Bluetooth module, you might find some useful information ‘Andre May 7.2018 (btiastthowtomechats torials/ardulno/ardulno.wireless.communication.nr24l0} tutorialitcomment. 3560) Can we do the “Hello World” communication between two arduino in only one PC? means i's anly has one IDE. can we? REPLY Dejan Nedeltawsk (htos/¢howrtomechate | May 9.2018 (tps: fhowtamechatronics cam/tutorials/arduino/ardulno-wiel ‘communicatlon.r24l0 tutorialcomment 3577) ‘Yes you can do that. You just need to start the IDE two times, so you will have two different IDE on which you can select the aifferent ports to which your Arduino are connected. REPLY theTechnowright june 29, 2018 (tos Jhowdomechate us duino/arduinos HonaraloLulorial#comment 866) tried to make the n8F24101 work, but the receiver cade is just showing some random symbols even ifthe serial menitor baud rates same as the code, Can you please tell me what might be the problem, Thank you REPLY Dei (htt tthowtomechatronics com) june 29,2018 (hitns//howlomechalranics com /utrialstardulnalarduinas communication-n/f24l01-tutoriaVétcomment-3869) ‘Try to use decoupling capacitors and ty to place the transmitter and the receiver at some distance, atleast 1m. Engr Showkat Al july 2, 2078 (htipss//howtomechatronics comtutorials/arduino/arduino.wireless-communication-nef24l0'-tutorial#tcomments 4008) Excellent tutorial. How can i communicate more then two Ariuinos using NRf24L01. | am working on a project where i have LCD with each arduinos and there is no concept of master-slave init. for example, Arduino A send message to arduine & and C and display that message on B and CLCD. and then 8 or C reply to AAnd A show the message on LCD. “This projects based on consensus control of multi-agent systems where every agent is responsible to control its own resources. Dejan Nedelkovski (htns/howtomechatronics.com) August 1, 2018 (atsps,//howtomechatronics com/tusorials/arduino/arduino-wireless: communication-nrf24\01-tutoriay#tromment-£025) ‘Thanks! Check my other tutorial for making a wireless network with RF24Network library. Jepher August 22,2018 (htspsJthowtomechatronics comMtutaral/ardulno/arduine-wireless-communication-nrt74l0} sutorialiicomment-4146) Mi Thank you for your tutorial. gives me an alternative for wireless communication between devices. ‘May know how can increase the distance range, and does the devices need a gect line of sight orf it possible to communicate even there isare ‘obstruction n between? Thank you, Dejan httos/showtomechatroncscom) August 25,2018 (httns.//howtomechstronks ri24io} tutoriav#comment-4366) ‘om/tutorials/arduinofarduino-wireless-communication: You cam increase the range by using PALNA SMA Antenna, And of course, the communication s possible even ifthere are obstacles lke walls, bt In that way the range will be decreased, Jepher August 31,2018 (httgsJshowtomechatronics com/tutorals/arduina/arduino.wirelass-communication-nrf 2401 sorialttcommer 1188) ‘Thank you, | have tried wireless connection using RF432MH2 module, But when Itvy to obstruct thelr Une of sight. cant receive the signal of the sransmitter. Ihave a follow up question. Please do correct me ifm wrong, musing Arduino Pro Mini the SPI pins will be; MOSI1), MISO(12), SCK(T3). Arn leorrect? (Gerald Decernber 24, 2018 (httos/showtomechatronics com/tutorlals/arduino/arduino-wireless.communication.n1124)0.tutorial/#comment-S012) ‘Thanks a lat for your work to stretch aut the basic principles in an easy and comprehensive way to everyone, Once again | used one of yaur great tutorials fo the frst stap to a new topic before diving into depth and realizing my own thoughts and ideas. realy can recommend your publications as a quick introduction to the howto’ Keep the ball ali. REPLY Dejan (httys:/howtomechatron rfzaioy com) December 28,2018 (https//howrtomechatronics.com/tut oal#tcomment-5030) rorlals/arduino/ardulnosnireless-communication- ‘Thank you so very much, mm glad to hear this! RePLy ‘sayan chowalhury December 28, 2018 (https: /thoutomechatronies com/tutorials/arduino/arduine-wireless-communication-rrf24I01 {utoriaVitcomment-5051) Hi, Thanks forthe video, 1am facing an unusual problem, Here is part of the receiver cade | am working with The "Avalable” string is getting printed . but there is no content inthe text variable, ts ust blank Please help If (radio avalableg) ¢ Serial printin Available” char text[32] =": radio.readt&ten, sizeoftext); Serial printintexth) REPLY Dejan (hts howtomechatronics.com) Ds 10,2018 (https howtomechatronkcs com/utorlals/arcuino/ardulnos amunication: alo tutorialtcomment-$073) 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 stance the two modules atleast a meter. REPLY wovu December 29,2018 (https /Hhowtomechatronics com/tutorials/ard e lon ne 2a 1.5060) Hello ‘The first example, writing "Hella World” works with out problem, But the second example isnot working for me, don't know the reason, I checked my wiring ofthe 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 | upload the code to UNO and MEGA the servo moves at end af cade uploading. ut when | pus joystick and button nothing happens. Is there any thing | need to consider? REPLY Dejan hts howtomechatronics.com) Deceonier 30,2018 (hits hatronk terlalsJardulno/ardulnoswiralesecommunlcation. nrfzdiot cutorlaV#tcomment-$070), Hey, what about capacitors ry to use capacitors near the modules VCC and GND and distance a bt the two modules. REPLY wou january 1,209 ps/Jhontomechatronics.com/tutorials/arduino/arduino-wireless.communicat n-nrfzalottutoriaV##comment-5096) Thanks for your reply. The problem was one ofthe nr/24I01 module was not working properly (t only receives, doesnt transmit). takes me long time to identify the problem. Luse another nrf240t and it works with aut problem. Vedat Esbruary 12,2019 (hitasJMnowtornechats futorlals/ardulno/arduino sureless-communication-arf24l01 tutorial 5872) Hi, this s exactly what need for my DIY RC Plane. But | car‘t get this te work with 2 arduino unos. Does the board matter, looked up the corresponding ISP pins forthe Uno boards, | dont know why its not warking. I would appreciate a helpful response, Thank You. REPLY Dejan hts houtomechatronics.com) Eebruary 13,2018 (tsps ronics com/iutovialsard ion: rfzélot xutorlavéeomment ‘The boards doesrit mater, Most af the time the prablem 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. Ubatdo February 22,2019 (hitas:/howtomechatronics com/utorials/arduino/arduine-wireless-communication-rf24l0 -tutorialitcomment 5664) Congratulations my friend, your videos and explanations have helped and motivated an immensity f students and professionals, thank you for, sharing your knowledge, we thank you from the heart. Dejan es Uhowtomechotronics.com) February 23,2019 (bps/Jhowromechatronics com/tutorials/ardulno/arsuino-nireless-communication- nr{24101 tutorial ¥commens-S67) Thanks, tm glad to hear that! Juine/arduino-wiceless-communicaton.nr 240 sutorlal#comment.6320) ‘Asif Anowar Anr.25.2018 (hispslshowtomechatronics.com/tutor ‘Thank you very much. ve just made the project using 2 UNO boards..Very nicely explained ... @ REPLY Dejan httas/howtomechatronics.com) Apel 26, 2019 (ntos:/fhowtamechatrankes cam /utorlals/atduino/arduinaswireless.communication. ‘ari2ald1-tutarlaldcomment.6332) Great nice to hear that! © REPLY t olarduinosvirelesse on-nr{24l01-tutorial 269) 2012 (bttasuih bi ‘Thanks for the tutorial. | was able to have it up and running inno time! lone question though, so with the transmitter cade | am useing a mega2S60 Toner Stay ‘as wel, but lam trying use a nano instead and whenever | put the pins that are normally on the 50,51 and 52 pins of the mega2S60 and put them con 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 land 52 forthe transmitter, any way | cam fx this? REPLY com/tutorals/arduino/arduino.wireless-communication-nef24)01 Dejan (httas/showtomechotronics.com) May 1, 2018 (https:/showtomechatror suorial#comment-4270) ‘The SPI pins of the Nano are SCK -13, MISO - 12, MOS {you use a capacitor right next tothe madule for stabilizing the power supply. 11, Seif connected properly it should work the same as with the Mega, And make sure Tanner May 2, 2019 (hitos:/mowtomechatronies.com/tutorlals/arduino/arduine-wireless-communication-nrf24l01-tulorial#comment.6373) I switched the pins to the ones you said to andit worked, Thanks again! Ashish Bansal uly 3.2018 (hispsi/howtomechau jutoralsard e lon-nr 24101 sutarial 1.6970) ai If for some reason (tke while using an Arduino moter shield) digital pins can be blocked, ‘The SIP pins are available on CSP header and can be used there but can use analog pins lke Ad and At for this line RF24 radio(7, 47 CE, CSN. REPLY Bloke Caldwell August 16, 2019 (ntps:/howtomechatronics.con/tutorials/ardulno/arduino-wreless-communication-nrf24101-tutorial#tcomment: 728, “Thanks forthe great tutorall ve spent los of time with these sorts of projects, but this isthe fist time Ive played with Arduino. I couldnt get it working at frst because of areal dumb mistake I might be able to help others avoid, | assumed your tle Arduine had the same pins as my Pro Mini Uno, That wasrit so ~ my pin 13 was an the ather side ofthe board, Once | realized that, and hacked up the wires by pin number rather than by your schematic, everything worked great, REPLY Dejan (httas/howtomechotronics.com) August 16, 2019 httns:/Jhowtomechatonics.com/tutorials/arduino/arduino-wireless-communication: rfzaio1 cutoriali#comment-7338) Hey, thanks for the input! Vedat August 27,2019 (htips/thowtomechatronics com/tutorialsfarduino/arduine-wireless.communication-nrf24l01 tutoriaVi#comment-7414) Hi, Lwas able to make this work but instead of b-drectional communication, Iwanna be able to control wo servos with joystick, How can I modify the code and the pin connections to do thar? Dhiroj Kushwaha December 7, 2019 (hispe//howtomec m atronics com/tutorals/arduino/arduino-wireless-communication-nr(24l01 oria/#commer Hey there please, my nrf24L.01 works rarely some times it does work and some times it worksll Can you suggest me any solution please rm new to ‘his things please...and i have also connected 3 47uf capactorto the power suply of the module but itis ot working every tell! Dejan ttps/thoutomechatronics comm) December 2, 2019 (nttps/thoutamechatronic ri24io} tutoriav#tcomment-8340) com/tutoriale/arduino/arduino.wireless-communicstion- Hey, what about the power supply, ty to use an external power supply. The 3.3V power supply of the Arduino sometimes is not enough to power ‘the module, Try to use a diferent dedicated power supply for the module. In such a case make sure you connect the ground pin of that power supply withthe ground pin of the Arduino in order to work things propery. ‘Shaun Landau December *2, 2019 thiipsv/nawtomechatranics.com/tutoriale/ardino/anduino-wireless-conmmunication-nef24I0" tutorial #comment: 9239) Hello Dejan, Great tutorial. thanks! | have zero experience with Arduino but | understand its good for robotics prototyping and figured | would dig in to see fit will work for my use case. |was hoping you could confirm that my assumptions are correct 1. Sketch can open a connection (seriaP} to computer aver the standard USB connecter, and this single connection can be kept open for the duration ofthe sketch: 2, This connection is shared on the computer so that itis accessible to any app running on the computer (read/virte), e.g. apps builtin java, NET, Golang, et 3, Sketch can read from the connection and send commands to @ NRF24LO1 module to simulate the transmitter for an RC device: ‘Am | dreaming up something that srt currently possibly or that doesnt exist? ‘Thanks in advance. Dejan https #houtomechatronics.com) December 17,2019 (hitps://howtomechatronkcs.com/tutorals/arduino/arduino-wireless-communication- nrfzdlot tutoriaVi#comment-8287) Hey, thanks! Well our assumptions are prety good and correc. Mojor Dawg February 11,2020 (hitps:J/howtomechstranics.com/tutoralsfarduino/arduine-wireless-communication-nrf24l0 tuloriali#comment 9678) WOW! Great tutor’als, | have been working abit with Arduine's now and your ste has been extremely helpful | dié have a question about the [NRF241.01 vs, €5P8268, Would the ESP8266 work as well asthe NRF24LO1? A friend gave me a couple to play with for aproject and have not really used them before? jan httas/showtomechatranics.com) February 22,2020 spsl/howtomechatronics com/tutoriale/arduino/arduino-wireless-communication- ri24io} tutoriav#comment-8757), ‘Thanks, tm glad you find them useful. To be honest. | cnt have much experience with the ESP8266 module so I couldnt give you any proper answer right now. Cheerst Christ Joseph March 16,2020 (https Jthowromechatronics.com/tutarals/ardulna/arduino-wireless-cormunication-nrt 2401 tutoriaVitcomment. 9952) Ltvied several times but can‘t get any values from ardiuno mega... But ts works on uno... want mega as receiver. Check connection and all all are 2004... Anyone tells what happening on megaz2???? Dejan (hatas/showtomechatranics.com) March 22,2020 thtres//hovitomechatronics.corn/tutoals/arduino/arduing-wicslese-comnmunication- ri24lot-tutoriav#comment-9012) That's kind of weird. Maybe there is something wrong with your Mega board. Make sure you are using the correct SP pins on the Arduino Mega. ‘Also, a5 | always suggest, use decoupling capacitor at the 3.3v input pin ofthe module Sveto june 6, 2020 (atps:howtomechatranics.com/tutorlals/ardulinofarduino.wireless-communication-nrf24l01-tutaralscomment.9615) Great tutorial! Actually | really enjoy all of your Ideas and articles. In thaton, | drop onto some smal issue “The given example didnot run in the beginning, I download the latest r24 library but sil nothing sent, nothing get. Then, | replace: from > const byte adress(s to-> const byte address(5} and all run lke charm, Have na idea was it my fault, or something is new inthe last library. That is my observation, and the Arduino IDE isthe last fone, 1.8:something cheers REPLY Rudolf june 14,2020 thst at Lota ardulna-wicsleses lon. 2AlD tutorial 6) Very useful tutorial, many thanks. Question: does it make sense to stop transmitting data when that data does not change? on the receiver side, 1 have 2 loop which reacts on changing data (position of joystick. so, as long as the joystick is pushed left, the value ofthe joystick actually does not change, so why sending its position continuously. When the joystick is not pushed, it sts in the zero-position, and we would stil send this. Is that necessary forthe receiver er can that be stopped, e.g, by comparing new and old value and jump aver racio.nrite(@joystick,sizeof{oystic). REPLY Dejan (htps:/thowtomechatronics.com) june 22, 2020 (htos:/snowtomechatronics.com/tutorlalsJarduino/arduino-wireless-communication: rfzaion ‘Well yeah guess you can do that I'depends what you want to achieve with It like power saving or so. In such a case it would be useful LEAVE A REPLY ‘Your email address will not be publishes, Comment Name* Email* Website SUBMIT yer Seer slfepeb com) LATEST POPULAR (butnsushowtomechatronics.convtutoriale/arduino) How To Make an Arduino Radar, (bitnsu/howtomechatronies.com/or : snechatron¢s.comn/tutorials/arduino/n tori. 24988-driverand.ardulnod 901 Pw Bene (hep:tontomacstone condor eel hae /howtmechatenies con/att (bttpssJhowtomechatronics.conviutorials/arduino/arduino-ic-motor-control-tutorial1298n-qwm-h-bridged) =a (buunsu/howtomechatronics.com/orojecs/arduino-color-sorter-project) ‘etn ole Sate Poet higeshonomechavoie comipeetaaéuin-ceo socergaeat) 4 nus tues tentamechaancecaniatbeiagtan? a (2 ites shentmarhaveries com slnlfcomeet FOLLOW ME! Join My Newsletter! Get notified when | publish new projects and tutorials straight to your inbox. Enter you email RECOMMENDED a REM Cm eli A. Mz (nttps/en pcbway comfrom=howomechatranics01) HOW To MECHATRONICS HowTeMechatronics isan education website in the area of Mechanical, Electrical and Computer Engineering. Tutorials, Tips, Ticks, How It Works, Projects, Examples, Source Codes, Download fles and much more can be found here, DIscLosuRE HowToMechatronics isa participantin the Amazon Services LLC Assaciates Program, an affilate advertising program designed to provide a means for sites to earn advertising fees by advertising and linking to Amazon.com one ©2019 owToMehaonts com, AI/GNS ste. Ses and unin as sens lie | Bn) he as amas ots confess:

Você também pode gostar