HELP with RC receiver PWM programing.

Hi guys,

I have a problem.
I know how to read PWM signals from my RC receiver using pulseIn but how do I program it to light up different LED using the PWM signals?

Let's say I have LED A, B, & C.
I would want my LED A to light up from PWM signal 1000 - 1300 and LED B from PWM signal 1300-1600 and LED C from PWM signal 1600-1900.

Also I do know that I can use the interrupt function with PWM signals, but I do not quite understand the function of interrupt. Will the interrupt function help me with this project that i have?

Hi guys,

I have a problem.
I know how to read PWM signals from my RC receiver using pulseIn but how do I program it to light up different LED using the PWM signals?

Let's say I have LED A, B, & C.
I would want my LED A to light up from PWM signal 1000 - 1300 and LED B from PWM signal 1300-1600 and LED C from PWM signal 1600-1900.

Also I do know that I can use the interrupt function with PWM signals, but I do not quite understand the function of interrupt. Will the interrupt function help me with this project that i have?

I would want my LED A to light up from PWM signal 1000 - 1300

Do you mean you want the brightness to vary based on the PWM signal? Or just that when the value is in that range, the LED should be on?

If it is the latter, a simple if statement and a digitalWrite() are all you need.

Something like this maybe

if (value < 1300) {
   // light LED A
}
else if (value < 1600) {
  // light LED B
}
else {
  // light LED C
}

…R

DON’T DOUBLE POST. I already replied to your other post on the same question

I am suggesting to the Moderator to merge the Threads

…R

I think that you need a description of your RC control protocol, including number of channels etc.

@TheDarrenn, please do not cross-post. Threads merged.