Right now I'm doing my project at school of making a controller for radio control. I'm a beginner to Arduino, so I tried to look for tutorials on Youtube and other platforms. My controller is required to have several connection methods, so I tried NRF24L01 and HC-05. But as I looked through the internet, there are only tutorials showing how to build them seperately, I have not found any combination of these 2 modules. So my question: is it possible to have both NRF24L01 and HC-05 on 1 controller? If yes, how can we define which connection we are using?
Can you explain more detail? Right now I already have the code for the NRF24L01, so I have to do add some code for the HC-05 as well and the program will automatically decide which method to connect with the receiver?
The HC05 communicates via a serial port. So you would use serial read and write. The particular serial port depends on the Arduino board. For an Uno or equivalent, I would use a software serial port. For a Mega or other Board with multiple hardware serial ports I would use one of those.
Just to be clear, an nRF24 cannot talk to a HC-05.
Assuming you have two Arduinos each with an nRF24 and a HC-05 it should be possible to communicate using either.
Bluetooth and nRF24 both use the 2.4GHz band. There must be some risk of their transmissions interfering with each other. I'm not convinced that having two communication routes will make any useful improvement in reliability.
Designing programs so that they could recognise and use the more reliable route would not be trivial - just more stuff to go wrong.
Thank you for the explainations! I have one more question, I'm following this tutorial:
There are 2 modes in his controller: exponential and linear mode. Can you please explain for me the function of these 2 modes in controlling devices? What is the difference? And why we need these modes in a controller?
Robin2:
Just to be clear, an nRF24 cannot talk to a HC-05.
Assuming you have two Arduinos each with an nRF24 and a HC-05 it should be possible to communicate using either.
Bluetooth and nRF24 both use the 2.4GHz band. There must be some risk of their transmissions interfering with each other. I'm not convinced that having two communication routes will make any useful improvement in reliability.
Designing programs so that they could recognise and use the more reliable route would not be trivial - just more stuff to go wrong.
I understand. Most of the projects I see, they only use 1 kind of connection. But my task of my school project is to create a joystick with multiple-connection (I don't understand why) and that made me quite confused until now...But task is task and at the end of day, I still have to handle my project. By the way, do you have suggestions in programming the code for the receiver and transmitter, so that they can recognise signals between Bluetooth module and NRF24L01?
The Bluetooth signals will come through a serial port. The rf24 will come from the SPI interface. Look at the examples in Robin2's tutorials* to see how one reads from the different interfaces (hint - the available() method).
That video seems to explain the two modes very clearly. In the linear mode moving the joystick 25% increases the value by 25%. In the exponential mode the first 25% of movement does not change the value much and the last 25% changes it a lot.
You probably need to try out the two modes with your radio controlled machine to find out which is most suitable. The exponential mode looks like it would give much finer low-speed control
Robin2:
That video seems to explain the two modes very clearly. In the linear mode moving the joystick 25% increases the value by 25%. In the exponential mode the first 25% of movement does not change the value much and the last 25% changes it a lot.
You probably need to try out the two modes with your radio controlled machine to find out which is most suitable. The exponential mode looks like it would give much finer low-speed control