The nRF24L01 - Wireless Joystick for Arduino Robot Car with nRF24L01+
DroneBot Workshop
Use the nRF24L01+ to build an Arduino Robot Car with a wireless joystick!
Get all the code and more info about using the nRF24L01+ at https://dbot.ws/nrf24l01 More articles and tutorials: https://dronebotworkshop.com Join the conversation on the forum: https://forum.dronebotworkshop.com Subscribe to the newsletter and stay in touch: https://dbot.ws/dbnews
Let’s learn how to use 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 - https://youtu.be/oQQpAACa3ac.
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 https://dbot.ws/nrf24l01 .
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:
00:00 - Introduction 04:22 - Introducing the nRF24L01+ 09:16 - Tips for using the nRF24L01 12:06 - Hooking up the nRF24L01 module to the Arduino 14:23 - RadioHead Library Intro 17:44 - The Radiohead Library Basic Client-Server 24:08 - Demo 1 26:18 - Radiohead Reliable Datagram 31:57 - Demo 2 33:03 - Joystick Demo Hookup & Code 40:36 - Joystick Demo 42:36 - Wireless Joystick Hookup & Code 59:51 - Wireless Robot Car Demo 01:02:14 - Car Crash Bloopers!
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 ... https://www.youtube.com/watch?v=lhGXAJj8rJw
211079587 Bytes