arduino 2.4ghz transceiver module

We will learn how to make a wireless communication between two Arduino boards, using the NRF 24 lo1 transceiver module for explaining the wireless communication. We will make two examples. The first one will be sending a simple hello world message from one Arduino to another, and the second example will be a bi directional communication between two Arduino boards, where using the joystick at the first 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 first Arduino now let’s take a closer look at the NRF 24 lo1 transceiver module. It uses the 2.4 gigahertz band and it can operate with baud rates from 250 kilobits per. Second, up to 2 megabits per second, if used in open space and with lower body rate, its range can reach up to 100 meters. This module can use 125 different channels, which gives the 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, the power consumption of this module is just around 12 milliamps during transmission, which is even lower than a single LED. The operating voltage of this module is from 1.9 to 3 point 6 volts, but the good thing is that the other pins tolerate 5 volts logic, so we can easily connect it to an Arduino without using any logic level converters 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 have different SPI pins, the pins CSN and I can be connected to any digital pin of the Arduino board.

And they are used for sitting 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 NRF 24 lo1 modules to the ERV. No boards, we are ready to make the codes for both the transmitter and a receiver. First, we need to download and install the RF 24 library and make sure you have the correct one. You can find the download link on the website article, so we need to include the basic spi and newly installed RF 24 libraries and create an RF 24 object. The two arguments here are the CS: N and C II pins. Next, we need to create an array which will represent the address or the so called pipe through which the two modules will communicate. We can change the value of this address to any five 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 transmitter in the setup section. We need to initialize the radio object and using the radio dot open, riding pipe function. We set the address of the receiver, to which we will send data. The five letter string we previously set on the other side add the receiver using the radio dot set reading pipe function. We set the same address and in that way we enable the communication between the two modules.

Then using the radio dot set PA level function. We set the power amplifier level in in our case, I will set it to minimum value, as my modules are very close to each other note that if you are using a higher level, it is recommended to use a bypass capacitors across the ground and 3.3 volts Of the modules so that they have more stable voltage while operating next, we have the radio dot, stop listening function, which says the module as transmitter and on the other hand, we have the radio dot start listening function, which sets the module as receiver. In the loop section at the receiver, we create an array of characters to which we assign the message. Helloworld. Now using the radio dot write function, we will send the message to the receiver. The first argument here is the variable that we want to be sent by using the ampersand before the variable name. We actually set an indication 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 function size off gets all bytes of the string text at the end of the program. We just add one second delay on the other side at the receiver in the loop section, using the radio dot available function, we check whether there is data to be received if that’s true.

First, we create an array of 32 elements, called text in which we will save the incoming data. Using the radio dot read function, we read and store the data into the text variable at the end. We just print the 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. Helloworld gets printed each second next let’s see the second example here’s the circuit schematic, and now we will take a look at the arduino pods what’s different here from the previous example, is that we need to create two pipes or addresses for the bi directional communication in The setup section we need to define both pipes and note that the writing address at the first Arduino needs to be the reading address at the second Arduino and vice versa. The reading address at the first Arduino needs to be the writing address at the second Arduino. In the loop section, using the radio dot stop listening function, we set the first Arduino as transmitter, read and map the value of the joystick from 0 to 1 hundred and eighty and using the radio dot write function, send the data to the receiver. On the other hand, using the radio dot start listening function. We said the second Arduino as a receiver and we check whether there is a valuable data. While there is a valuable data, we will read it save it to the angle V variable and then use that value to rotate the servo motor.

Next we set the first Arduino as receiver and with an empty while loop. We wait for the second Arduino to send data and that’s the data for the state of the push button, whether it is pressed or not. If the button is pressed, the LED will light up. So this process constantly repeats, and both you know, are constantly sending and receiving data that’s.


arduino 2.4ghz transceiver module Video







arduino 2.4ghz transceiver module news








    arduino 2.4ghz transceiver module Social






    Cornell University’s new stretchable optical lace could enable robots to sense how they interact with their environment and adjust their actions accordingly.
    safe image.php?d=AQDXADPj1D27 t G&w=720&h=720&url=fbstaging%3A%2F%2Fgraph.facebook - arduino 2.4ghz transceiver module

    A fun way for students to learn about the brachistochrone curve!
    safe image.php?d=AQArTUHNIZGT7f9q&w=720&h=720& content%2Fuploads%2F2019%2F09%2FF60EQG4JYMTCR7E.LARGE  - arduino 2.4ghz transceiver module



    Originally posted 2015-11-01 16:48:49.

    (Visited 186 times, 1 visits today)

    About The Author

    You might be interested in

    Comment (25)

    1. I changed the code a bit and I am only sending the values of the joystick, not receiving anything. And I only get 0 on the other side, because I am printing the values…Does anybody know why ???

      1. @François Guyot I actually managed to get it work. It seems like my NRF24L01 Adaptor was broken. I tried without it and it worked just fine…lol…Thanks anyway!

    2. Hi, thanks for this helpful tutorial ! I love it !
      But on Arduino, how to know with a “if” if the RC has lost the connection ??

    3. Hello, I am super new to nrf24L01 and I am trying to send a data to another but fail. I have created an Ohm meter using an arduino and I want to send that calculated data to another but I cannot. Can you help me please.

    4. Can I make the arduino(1)send a signal to another arduino(2) to switch the light that is in the arduino(2)? When the arduino(1) is plugged and closes when unplugged.
      (sorry for bad english)

    5. Would this transceiver work with a high frequency high power plasma cutter running. I am starting work on an idea I have to use servos to remote operate some switches on the console

    6. I thank you for this video and the tutorial link, I learned a lot from you.
      I share your creations and put thumbs to the sky. 😉
      Continue like this, I become a big fan ^^.

    7. I’ve got in the serial port monitor message like this but upturned question mark –>>> “????????????????????” What is the problem? I’ve done everything like in this video :O

    8. is CS = CSN pin on the the picture description …(53 on mega, and 10 for Nano/Uno) ,but why we set radio (7,8)? why not (7.10 or &.53)?

    9. One tip which may help someone: if you use NRF24L01 + adapter, connect the adapter to the 5V pin, cause in my case it doesn’t work with 3.3V

    10. I will use this module with arduino pro mini 5V. 3.3V must be used with this module not higher than 3.3V . Which value of resistor should I use to connect arduino 5v Vcc

    11. *How do I use NRF24L01 along with a PIR sensor for a mini security setup, to make the other arduino flash the LED when someone enters my house (like parents who like to sneak up on me while im gaming) please reply this is a huge problem for me… They leave me no slack.. I want to use a small arduino battery powered hidden away.*

    12. Good afternoon, is it possible to communicate between this module wireless transceiver nrf24l01 as receiver with any control of 433mhz (transmitter), if so how?


    Your email address will not be published. Required fields are marked *