Hi Ive been reading through the forums and looking for a library which I can use to read the output of an rc receiver. All the code in the forums are based on using a composite ppm output. Any help would be greatly appreciated.
Cheers,
MDRobbo.
Hi Ive been reading through the forums and looking for a library which I can use to read the output of an rc receiver. All the code in the forums are based on using a composite ppm output. Any help would be greatly appreciated.
Cheers,
MDRobbo.
Sorry one more thing to add, I would like to be able to read an idividual channel.
If you're only interested in a single channel, then "pulseIn" might do the trick.
Search around the forum for PPM decode.
Thanks AWOL,
So something like this would work?
unsigned long pulseWidth = 0;
void setup()
{
 Serial.begin(57600);
 pinMode(8, INPUT);
Â
}
void loop()
{
 pulseWidth = pulseIn(8, HIGH);
 Serial.println(convert(pulseWidth), DEC);
Â
}
long convert(long pulseWidth)
{
 int value = pulseWidth - 1000;
 return constrain(map(value / 5, 0, 200, 0, 180), 0, 180);
}
That looks like a good start - why not try it?