I am currently working on a project connecting my RC transmitter with a simulator cable using an Arduino Uno and a RC receiver.
Transmitter ~~~ wireless ~~~> Receiver -- PWM --> Arduino --- PPM ---> simulator cable
As of now, I am able to read the PWM signals of the receiver using pin change interrupts on the analog pins. The last task would be to generate the required PPM signal for the simulator. I was thinking about timer interrupts to ensure, the PPM frames start at the desired time and use the remaining time of the frame for other processing tasks like reading the PWM signal. Since there is no way to run both ISR at the same, how can i guarantee, that both signals are processed error-free regarding their timings?
Dealing with interrupts is outside of my current experience level, but I'm just wondering out loud whether you might be better served using a DAC (digital-to-analog converter) and read in the value via a normal analog pin, or attach the receiver to the Arduino via SPI. It seems rather error prone to have your receiver convert a binary number into a series of PWM pulses and then have to convert those pulses back into an analog value by counting the pulses in the Arduino.
Well, its a regular 8 channel RC receiver I want to use with my RC transmitter. It just serves 8 PWM signals.
I think that all you need to do is read the input and write it to the output.
So loop() would just be
I should have said that if you cut in between the RF RX stage and the decoder you have only one input. not many to deal with