Build a 2.4GHz radio link between two Arduinos: a joystick transmitter on one end, and a receiver that follows your commands up to 30+ metres away.
What you’ll build
Two NRF24L01 modules form a radio pair. The transmitter Nano streams joystick positions; the receiver Nano turns them into servo motion — the same architecture as an RC car or drone link. Swap the servo for the L298N driver from the robot project and you have a full RC vehicle.
Components you’ll need
| Component | Qty | Price |
|---|---|---|
| Arduino Nano ATmega328P Compatible Board | 2 | ₹298 |
| NRF24L01 Module | 2 | ₹78 |
| Joystick Module | 1 | ₹39 |
| SG90 Micro Servo Motor 9G | 1 | ₹89 |
| 400 Point Breadboard | 2 | ₹598 |
| Total | ₹1,102 |
Step-by-step guide
- On both Nanos wire the NRF24L01 over SPI: VCC to 3.3V (never 5V!), GND to GND, CE→D9, CSN→D10, SCK→D13, MOSI→D11, MISO→D12.
- Solder a 10–100µF capacitor across the module’s VCC/GND if you see random disconnects — these radios are picky about power.
- Transmitter: wire the joystick to A0/A1 as in the pan-tilt project.
- Receiver: attach the servo signal to D5.
- Install the “RF24” library by TMRh20, upload the TX sketch to one Nano and the RX sketch to the other.
- Power both — the servo should mirror the joystick instantly. Walk away and see how far the link holds.
The code
Both sketches are below — the roles differ only in a few lines. The radio sends a two-int packet 50 times a second.
// ------- TRANSMITTER -------
#include <SPI.h>
#include <RF24.h>
RF24 radio(9, 10);
const byte addr[6] = "ARW01";
int pkt[2];
void setup(){ radio.begin(); radio.openWritingPipe(addr); radio.stopListening(); }
void loop(){
pkt[0]=analogRead(A0); pkt[1]=analogRead(A1);
radio.write(&pkt, sizeof(pkt));
delay(20);
}
// ------- RECEIVER -------
#include <SPI.h>
#include <RF24.h>
#include <Servo.h>
RF24 radio(9, 10); Servo s;
const byte addr[6] = "ARW01";
int pkt[2];
void setup(){
s.attach(5);
radio.begin(); radio.openReadingPipe(0, addr); radio.startListening();
}
void loop(){
if(radio.available()){
radio.read(&pkt, sizeof(pkt));
s.write(map(pkt[0], 0, 1023, 0, 180));
}
}Build this project
Add all 5 required components to your cart in one click — total ₹1,102.
Add all components to cart