
As you can see the accelerometer data is quite noisy. I tried dampening the vibration using foam underneath the circuit board, but that didn't help much. Looking at the gyro data it is quite smooth in comparison.
So I looked into using filters that combine the accelerometer data with the gyro data. Using the code for a Complementary Filter (thanks to RoyLB). I was able to produce the following results.
