Here's a full length tutorial on how to get complete orientation knowledge (yaw, pitch and roll angles) on the Beaglebone Black embedded Linux platform using an IMU (MPU-6050 from Invensense). This platform can be used to create mini rovers, quad-copters or any mobile application requiring orientation information in real-time. The data computed and collected from the IMU is streamed over WiFi to a remote computer to plot the orientation in a real-time 3D animation of the platform.
https://www.youtube.com/watch?v=XnqEGzvQBEA