Sending info through UART

Hi there!

I bought a Navio+ board some weeks ago and I already managed to make it running on my UAV.

Now, I’m trying to send data through the UART port on Navio+. I’m sending telemetry info through USB0 so I have free that port. I’m wondering if it is possible to do that.

I tried changing the UserCode file in ardupilot as well as the APM_config, in order to enable the USERHOOK_MEDIUMLOOP where I want to add the code. I’m trying to enable some of the UART ports available and send a message right after with these lines:

hal.uartA->printf(“Valor: %u”,rcin);

But when running ardupilot all I got is the message printed on the console. I also tried with uartB, C and E, but I didn’t get anything.

I’m not a programmer, I’m just learning on the way, so probably I’m missing some (or a lot) configurations needed to make it work, or what I’m trying is completly wrong. I’m wondering if someone could help me with this issue, I would be so grateful.

Thank you!

It is something possible sending telemetry by USB0 and other data by AMA0 at same time?

I checked the UART port with:

sudo screen /dev/ttyAMA0 57600

and it works ok. I also checked that console was disabled on /etc/inittab and /boot/cmdline.txt

Maybe I’m not running Ardupilot correctly, I use the command:

sudo ./ArduCopter.elf -C /dev/ttyUSB0

for telemetry on USB radio, should I enable the AMA0 port otherwise?

Thank you.