I really appreciate your help in all this, finally starting to understand how this is going to work. And extremely sorry for this huge wall of text and questions I'm about to bombard you with.
**For this hypothetical example I'm going to use the 315 MHz transceiver, just because the math is a little easier, however when I actually attempt to build this I will use 2.4 GHz transceiver.
So I have four 49 MHz RC cars that have four different channels. I'm trying to control all of them with the computer and preferably a single Arduino. My goal is to not modify the actual cars in any way and instead simply mimic the controllers RF output by using the transceivers on the Arduino.
If I understand this correctly, and was using the 315 MHz transceiver, for one of the 49MHz cars I would need it to modulate between (315 - 49) and (315 + 49), so between 266 and 364 MHz.
For the different channels this is then modified very slightly? So maybe the first channel is 49 MHz, the second channel is 49.2 MHz, third is 49.4 MHz and the fourth is 49.6 MHz, or something along those lines?
So if I had the transceiver, in order to find these slight differences in frequency I would use the receiver capabilities of the transceiver and select channel one on the RC car controller and select any random movement (forward, reverse, left, or right) and with the right coding I could get the frequency to be picked up by the transceiver and then transferred to the Arduino? And I assume I could get this to display on the serial monitor.
Then I could do this for every channel and be able to know their assigned frequencies.
One thing I'm confused about, however, is how I would figure out the pulse sequences of each direction. I read this article about how RC controls work and just as an example they state that:
- Forward: 16 pulses
- Reverse: 40 pulses
- Forward/Left: 28 pulses
- Forward/Right: 34 pulses
- Reverse/Left: 52 pulses
- Reverse/Right: 46 pulses
Is this information that can be picked up by the transceiver?
Assuming it is, at this point I now have the assigned frequencies and pulses for each channel, so now it's time to program the arduino to control the cars. So I need to set up variables that say
CAR_1 = 49 MHz
CAR_2 = 49.2 MHz
But of course this is an extremely over simplified version of how this would go. In reality I have no idea how one would set the frequency.
I did, however, find this code online from a person setting up a circuit to remotely control their garage door opener and found this bit of code:
// Set pulse length
// NB Pulse length must be set AFTER Protocol,
// because setProtocol(1) also sets pulse length = 350
I assume "mySwitch.setPulseLength(232)" is referring to the pulses that in my case would indicate direction? So based on the example I found for the directional communication, if I wanted the car to go forward (16 pulses) then it might looks something like this:
Thanks again for all your help!