After messing with it and a servo, it was time to connect it to the arduino. My first tests with the "pulseIn" function worked fine as a way to read the PWM signals, but this is not the right way to do it. A more efficient way is to use interrupts. Thanks to the guide at
http://rcarduino.blogspot.co.uk/2012/04/how-to-read-multiple-rc-channels-draft.html
I got it working with some effort. I stumbled a bit, as it seems that the higher order digital inputs on the mega don't seem to work with pin change inetrrupts, although pulseIn worked. I'll have to look into that. The other thing was a damned compile time error people have been talking about on the arduino.cc site ("collect2.exe. Ld returned 5exit status"). The workaround at forum.arduino.cc/index.php?topic=316146.0 seemed to work.
Some pictures:
Plugged into an Uno.Output showing roll, pitch and throttle outputs from the receiver
Discussions
Become a Hackaday.io Member
Create an account to leave a comment. Already have an account? Log In.