Page 1 of 1

how to receive x,y,z Data through UART2

Posted: Mon Dec 02, 2019 9:40 am
by juju
hi guys. i'd like to receive x,y,z attitude data through UART2.
The communication is now successful.
i used 'uart2SendData'.
What files should I go further and access and modify?

thanks!

Re: how to receive x,y,z Data through UART2

Posted: Mon Dec 02, 2019 1:27 pm
by arnaud
If you already have working communication, you can get the X/Y/Z position estimate using the LOG API. From within the Crazyflie you can read log variable in 2 steps: first get the log ID, then read the log values using the ID.

You can see an example of that in the push demo: https://github.com/ataffanel/crazyflie- ... .c#L63-L83.

The Crazyflie position is available in the log variables "stateEstimate.x/y/z".