I think the Read Receiver code has problems. I added a counter for each channel and I found the program was missing over a third of the pulses from the receiver.
I think the problem is the code only watches for the interrupt from one pin at a time. The other pins are ignored while the one pin is monitored. This approach is still much better than using pulsein but I wanted to find a program with reads all the pulses from the receiver.
I believe the program shown in this blog does the job nicely.
I added similar counters to this other program to monitor the number of input pulses were captured as frequently as expected.
Here's the output from some debug statements I added.
time since last = 6817 ms, expected new count = 340, [0] total = 8987, new = 310, pulse = 1616, [1] total = 8987, new = 310, pulse = 1476, [2] total = 8987, new = 310, pulse = 1480
time since last = 6819 ms, expected new count = 340, [0] total = 9297, new = 310, pulse = 1616, [1] total = 9297, new = 310, pulse = 1476, [2] total = 9297, new = 310, pulse = 1476
time since last = 6818 ms, expected new count = 340, [0] total = 9607, new = 310, pulse = 1616, [1] total = 9607, new = 310, pulse = 1476, [2] total = 9607, new = 310, pulse = 1476
time since last = 6819 ms, expected new count = 340, [0] total = 9917, new = 310, pulse = 1616, [1] total = 9917, new = 310, pulse = 1476, [2] total = 9917, new = 310, pulse = 1476
time since last = 6819 ms, expected new count = 340, [0] total = 10227, new = 310, pulse = 1616, [1] total = 10227, new = 310, pulse = 1476, [2] total = 10227, new = 310, pulse = 1476
time since last = 6817 ms, expected new count = 340, [0] total = 10537, new = 310, pulse = 1620, [1] total = 10537, new = 310, pulse = 1464, [2] total = 10537, new = 310, pulse = 1476
time since last = 6819 ms, expected new count = 340, [0] total = 10847, new = 310, pulse = 1616, [1] total = 10847, new = 310, pulse = 1480, [2] total = 10847, new = 310, pulse = 1476
Each line of output displays the time since the last debug statement. The number of pulses expected per channel if the pulses came at 50Hz. The channel id followed by the total pulses received from the channel, the new pulses received since the last debug statement and the pulse reading in microseconds. The same information is displayed for the other two channels.
I think this code is very promising.
Here's a copy of the code with the debug statements added. Nope, the post exceeded the 9000 character limit. I'll try adding it to its own post.
The code uses the input pulses to set servos. It would certainly be possible to mix the incoming pulses to customize control of the servos.
I'm not sure what the next step is. I think I'll try to modify the code to read additional input channels. I'll probably try adding three additional channels.