Introduction: Getting Started With Arduino - Nordic NRF24L01 Radios
In this tutorial, we will use a pair of Nordic NRF24L01 Radios to communicate between two separate Arduinos.
NRF24L01 radios are very cheap boards, ideal for short range communication between multiple devices.
We will set up one Arduino as a sender and a second as a receiver - for this you will need two Arduinos and two NRF24L01 Radios.
Step 1: Wire Up Your Arduinos
Both sending and receiving Arduinos need to be wired up in the same manner.
You will need 7 wires plugged into each Arduino. To make it easier to keep track of all the wires, it's a good idea to use 7 different colours. We have used the following coloured wires (as shown in the photos above):
- Grey: Connected to GND
- Yellow: Connected to digital pin 13
- Orange: Connected to digital pin 12
- Green: Connected to digital pin 11
- Blue: Connected to digital pin 8
- Purple: Connected to digital pin 7
- White: Connected 3.3v
Step 2: Wire Up Your Radios
Both radio boards need to be connected to the two different Arduinos in the same manner.
Using the coloured wires from the previous step, connect the radios as shown in the photos above.
Step 3: Write Your Code - Sender
The next step is to write some code to transmit data using one of the radios.
Download the Sender.ino file and open it up in the Arduino IDE. You can tinker with it if you like, or just use it as it is. Once you are happy, upload it onto your Arduino.
To run this code, you will need to download and install the Arduino MIRF library
Step 4: Write Your Code - Receiver
The next step is to write some code to receive data using the other radio.
Download the Receiver.ino file and open it up in the Arduino IDE. You can tinker with it if you like, or just use it as it is. Once you are happy, upload it onto your Arduino.
To run this code, you will need to download and install the Arduino MIRF library (also provided below)
Step 5: Connect Via Serial Monitor
Once the Sender and Receiver code have been successfully uploaded onto two different Arduinos, open up the "Serial Monitor" by clicking on the magnifying glass icon on the top right of the Arduino window. You should make sure that the monitor is connected to the Receiver serial device (rather than the sender) and that "9600 baud" has been selected in the dropdown menu at the bottom of the window. You should be able to see a stream of numbers arriving in the serial monitor window - these are random values generated by the sender, transmitted via the radios and picked up by the receiver.
Step 6: Enjoy
If everything worked, you should be able to send randomly generated number from the Sender Arduino to the Receiver Arduino. The range of communication will be around 100ft - although it is possible to purchase amplified radios to achieve a greater distance.
If you enjoyed this instructable, check out our other tutorials
If you love this kind of stuff, check out our degree
1 Person Made This Project!
- Abrasha made it!