Attached is a sketch that will translate a PWM signal from a standard channel output on a receiver, then output another PWM signal that you can attach a low-pass filter to, which gives you a 0-5 volt output. ( I am using a 1uf capacitor and a 4.7k resistor)
Using this sketch, and Open-TX I am able to send the RSSI information from the X8R sent to my Tarranis, and mix the RSSI information to a channel (I used channel 6). The Arduino then translates the receiver channel output to a usable signal. Then using a low-pass filter my APM is able to read the X8R RSSI information.
RSSI to Tarranis, Tarranis to CH 6 on receiver, CH 6 to Arduino, Arduino to low-pass filter, filter to APM analog CH 1
I have tested this with a Uno and it works as intended. Eventually I will use a Mini and combine with a sketch that also enables the use of the cheap HC-SR04 sonar modules with the APM.
Jeff
Replies