cancel
Showing results for 
Search instead for 
Did you mean: 

I am using accelerometer and gyro sensor to get the device orientation. Could you please tell me how I can acheive this. Thanks

utamb
Associate II
 
2 REPLIES 2
Nix Wayne
Associate III

Here is math background to get familiar with and to see what you really need:

https://www.google.com/url?sa=t&source=web&rct=j&url=https://cache.freescale.com/files/sensors/doc/app_note/AN3461.pdf&ved=2ahUKEwiD-8jv2tHgAhWjlYsKHWG_AeMQFjAAegQIBRAB&usg=AOvVaw0pD1Aq8Q87Y6FTDIVmCUio

Search the internet for examples how to get orientation. There are plenty. Especially arduino community has a lot of them. Again it depends what are your requirements.

Just a search query gives you many results: https://www.google.com/search?q=mpu6050+orientation&oq=mpu6050+orientation&aqs=chrome..69i57j0l3.6473j1j7&client=ms-android-huawei-rev1&sourceid=chrome-mobile&ie=UTF-8

Hello Nix Wayne,

Thank you for replying. My requirement has changed. Now I will be having my device with accelerometer and gyroscope sensors in it and the device is kept randomly in a vehicle. I was wondering how can I know the vehicle direction (going forward) using acc and gyro. Please give me some Idea.