I just bought an FrSky Taranis for my quad copter and needed to get the Mavlink data up on the Taranis LCD telemetry display. So here is my solution using a Teensy3.1 as a converter between MavLink and the S.Port on FrSky X8R.
See attached file below...
Yes,cutting the connection between VIN and VUSB makes it save to have the USB and SPort connected at the same time.
I cut the trace. Now the USB serial port is no longer an option. What do I need to do to be able to use the USB as a serial monitor again?
Disregard my last. I just connected 5V from a BEC to VIN and the USB Serial port appeared. Now I have to figure where the 5V from the SPort went.
can you tell me how to retrieve RCin of channel 3 from the MAVLINK Data?
Thanks Rolf for providing this great solution!
Most of the functions work well, and I find them very useful. There seem to be a few problems however.
1) GPS speed always shows 0 for some reason
2) GPS coordinates seem to be wrong. In particular my longitude is really off as you can see in the attached picture (i don't think -255 degrees even exists)
Do you have any idea how to fix it? GPS coordinates are especially important to me in case of a fly away.
first declare an variable
then you must request the APM to start sending this data, add in the loop function:
mavlink_msg_request_data_stream_pack(0xFF,0xBE,&msg,1,1,MAV_DATA_STREAM_RC_CHANNELS, MSG_RATE, START);
len = mavlink_msg_to_send_buffer(buf, &msg);
then to receive the value for the RC channel, add in the MavLink_receive function:
case MAVLINK_MSG_ID_RC_CHANNELS_RAW: //35
ap_rc_ch3 = mavlink_msg_rc_channels_raw_get_chan3_raw(&msg);
Now the ap_rc_ch3 holds the value for RC channel 3 input
You can also get the scaled output (the output value from APM) using:
case MAVLINK_MSG_ID_RC_CHANNELS_SCALED: //34
ap_rc_ch3 = mavlink_msg_rc_channels_raw_get_chan3_scaled(&msg);
My FW is the newest. I may try to reflash it again maybe. But it gave me no trouble so far, except this
try, I had exactly the same issue, after re-flash(in my case update) all working.
hmm,,,, are you using ppm? if no (pwm) just do a Y connector from rx... :)
ppm... is a different thing,
if u are using an openLRSng you could assign one of the pins to output ch3 pwm value in addition to PPM on the other pin (actually any Ch). in this case no programming is necessary and can be done through GUI, than catch the pwm value on one of the teensy's pins (this takes off the work from apm to repack ch3 pwm into mavlink)
in case you have an X8R, now, haven't tried this, but in theory should work: connect ch3 to one of the pins on your teensy, there will be your PWM value. <--- in theory haven't tried myself but can try tonight.