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