How to read sensor data from uart and send with mavlink to MP

Hi dear developers
i want to read sensor data from UART port and send this data to MP with mavlink
i create custom message on mavlink and it work perfect
I’m really confused right now, and I don’t know how to read data from UART and send it via MAVLink. Also, I’m unsure which function I should add to which file, or if I need to create a new file for this task?
The sensor needs to receive an activation command in order to respond.
“Could you give me some advice?”
Note:I don’t want to use Lua scripts to do this.
board—> CUAV5+
Thank you

any reason for not using Lua ? assuming he CUA5+ runs Lua…
There are a bunch of posts in this forum which im guessing you found. This one covers a lot.

1 Like

Thank for your help
Yes, I might have to resort to weaker boards, which is why I can’t use Lua scripts