How to send data from flight controller to another mcu using serial port?

Hi
I’d like to send data such as rpm using serial port following the instruction,
http://ardupilot.org/dev/docs/learning-ardupilot-uarts-and-the-console.html
but it did not work like this,
hal.console->printf(rpm);
Which serial port should I use, did I need to set the serialx_protocol? Thanks
I do not like to use mavlink

Using Mavlink is a lot simpler.

Hi, the other mcu could not use Mavlink! Thanks

Hi
I used hal.uartB->begin(57600) and hal.uartB->write(10), it worked.
Maybe Mavlink was more simpler and better, I would try it later, thanks

Thanks for posting your findings.

@talos is this the only code needed for this? Or have I something to add (includings etc.)?