![]() ![]() Both TX and RX must use the same channel. The precise frequency is determined by the channel that is selected. Like a lot of other equipment (WiFi and Bluetooth, for example) the nRF24L01+ modules broadcast on the 2.4GHz band. To try to avoid confusion I will assume that you are using one them (which I will refer to as TX or "master") to transmit and another one (RX or "slave") to receive. If you think that is the case then disconnect the Arduino from the USB cable and reconnect it.īecause the nRF24s are transceivers they can obviously transmit and receive. ![]() This can prevent the program from working properly. It seems that on some occasions the nRF24 does not reset after a new program is uploaded to the Arduino. But if you believe you have followed all the other instructions correctly and are having problems it would certainly be a good idea to install a capacitor. However I have not found it necessary to use a capacitor with my Uno (or Mega). The capacitor stabilizes the power supply for the module. It is recommended to plce a 10♟ capacitor across VCC and GND as near to the module as possible and I have found this essential when I made some units with an Atmega328 chip on a breadboard. I have found that they work satisfactorily when connected to the 3.3v pin on my Unos. Be careful NOT to connect the VCC pin to a 5v power supply. The nRF24 modules require a 3.3v power supply. If you are using pins other than 10 and 9 for CSN and CE you must still set pin 10 for OUTPUT to ensure that the Uno acts as the SPI master. The jumper wires come as a piece of ribbon cable and if you separate a piece with 5 wires and allocate the wires to suit the Arduino pins it is very easy to connect and disconnect the nRF24 from the Arduino without getting the connections mixed up. I use some female-male jumper wires to connect to the nRF24 for test and development. However for demo purposes it seems easiest to use pins 10 and 9 so that all 5 connections are adjacent on pins 13 to 9. It is also necessary to connect the CSN and CE pins and any of the Arduino I/O pins can be used for them. ![]() With the pins uppermost and the antenna on the right hand side the pin connections areīecause the nRF24s use SPI to communicate with the Arduino they must use Arduino pins 13, 12 and 11 (SCK, MISO and MOSI). The nRF24 modules that I am using look like this. Note that the demo programs will NOT work with the ManiacBug version of the library. If, before reading this, you have downloaded and installed the RF24 library the simplest thing may be to delete all traces of it and then download and install the TMrh20 version. Unfortunately, however, TMRh20 did not think to give his version a different name so it can be difficult to be certain which one is on your PC. ![]() This tutorial uses the TMRh20 version of the RF24 library which fixes some problems in the earlier ManiacBug version. Modified examples 1 and 2 to listen on Pipe 1 in accordance with the textĮdit Added Reply #29 with a simple program to check the connection with the Arduino I have today downloaded and successfully tested all 3 pairs of programs with Arduino IDE 1.6.3 - 2 small corrections were needed for SimpleTxAckPayload.inoĮdit 2016 ( oops). The nRF24L01+ 2.4GHz transceiver modules are cheap and very effective but I have come across a few Threads in which people were having trouble with them so I thought it might be useful to gather together in one place a basic step-by-step sequence for getting them to work.ĮDIT - For this Tutorial install Version 1.1.7 of the RF24 library (available with the Arduino Library Manager). ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |