The nRF24L01 – Wireless Joystick for Arduino Robot Car with nRF24L01+
Get all the code and more info about using the nRF24L01+ at https://dbot.ws/nrf24l01
For more information and other great projects and tutorials please visit https://dronebotworkshop.com/ .
Let’s learn how to yue the nRF24L01+ radio modules! These inexpensive devices can add 2-way wireless communications capability to any Arduino project and once you understand how to work with them they are very easy to use. They perform well both indoors and outdoors.
We will use a couple of nRF24L01+ modules to construct a wireless remote joystick for the Robot Car that we constructed in an earlier video. If you haven’t seen the original robot car video you can take a look at it here – .
Actually you can use this setup with any robot car base as the speed sensors we used in the original video are not used in this design.
In order to simplify our work with the nRF24L01+ modules we’ll make use of the RadioHead Library, a very versatile Arduino library that works with all sorts of radio modules to provide advanced communications capabilities. We’ll examine a basic client-server data exchange system and a more advanced 2-way system that uses the “Reliable Datagram” method of packet communications. This is the system that we will adapt to use with our robot car joystick.
Even if you have no desire to remotely control a robot car you’ll still find the lessons valuable as they show you the basis of exchanging sensor and text data between two Arduinos. You can use this code in other remote sensing and control projects.
As always the code for everything, along with a detailed article, can be found on the DroneBot Workshop website at .
It’s a VERY long video today, even for me! So if you want to skip ahead to the part that most interests you here’s the table of contents – just click on the timestamp to move to that part of the video:
Introducing the nRF24L01+ – 4:22
Tips for using the nRF24L01 – 9:16
Hooking up the nRF24L01 module to the Arduino – 12:06
RadioHead Library Intro – 14:23
The Radiohead Library Basic Client-Server – 17:44
Demo 1 – 24:08
Radiohead Reliable Datagram – 26:18
Demo 2 – 31:57
Joystick Demo Hookup & Code – 33:03
Joystick Demo – 40:36
Wireless Joystick Hookup & Code – 42:36
Wireless Robot Car Demo – 59:51
Car Crash Bloopers! – 1:02:14
I even threw in a “bloopers” section for those of you who manage to make it to the end!
If you have any questions about using the nRF24L01+ with the Arduino please let me know in the comments. And if you haven’t subscribed to the channel yet please do!
source