Software apps and online services
Hand tools and fabrication machines
IMU and Digital Compass (H0BR40) is a 3-axis Inertial Measurement Unit (IMU) + 3-axis Digital Compass, which means it can be use as accelerometer, gyroscope and magnetometer.
I used just the accelerometer to calculate two of the three aircraft principal axes angles which were roll and pitch, duo to some physics I couldn't get yaw from accelerometer.
First of all, I needed to get a stream of filtered and calibrated accelerometer values in g. according to the module's factsheet you can get that by using the CLI commands.
Once we get the Acc values it would be something like this:
Acc(G) | X: 0.20, Y: 0.98, Z: 0.06
Which would be a string now I used processing to get the values from this string.
After that using physics and math magic I get roll and pitch.
Below you can see three videos the first one is testing just roll - you can do that by adding // before rotateX(YaPiRo); - the second one is testing pitch - again you can do that by adding // before rotateZ(YaPiRo); - finally the complete thing: