PulseIn() in questions

Hi everyone.

I read RC signal on 4 PINS 4,5,6,7 I read them by Pulsein() I store them as a value in value4, value5, value6, value7 I convert pulses onto degrees I write them by servo1.write(degrees4), servo2.write(degrees5) etc.

Problem is that : 1) The servo expects to see a pulse every 20 ms (.02 seconds). 2) During this time, the function is just waiting for theese pulses to get HIGH. If I am lucky, pulses commes sooner. 3) Reading pulses by Pulsein() for 4 PINS takes about 80ms of waiting for timout set for 20000.

Help me in following: 1) How to manage program to read RC pulses and donĀ“t wait like Pulsein() does? I am also reading data on serial TX/RX. If I use interrupts, it interrupts every 20ms and I loose data on serial... How to handle serial reading and Pulsein() EASILY? Or just post any proposal.

Thanks for any post. Petr

If you can get access to the composite signal from the receiver you can read the entire frame through a single pin using hardware in the Arduino chip to measure the pulses (no interrupts are required).

There is a thread that discusses this here: http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1228137503

Thank you for the link.