I want to get the current heading value from my vehicle in real time and receive it to an arduino so that i can run a custom script.is that possible
Yes, it is possible to get the vehicle heading via MAVLink messages on a serial port in real-time.
- Connect a FC serial port to an arduino serial port
- On the FC configure the serial port PROTOCOL to MAVLink2 and the desired baudrate
- On the arduino configure the serial port to the desired baudrate and teach arduino to talk MAVLink
- run a custom script on the arduino
or
- write a custom lua script that runs directly on the FC, no need for arduino hardware, no need for arduino software.