We have updated our git repository with python code for the BerryIMU.
This is specific for the BerryIMU, however the math and code can be applied to any digital IMU, just some minor modifications need to be made. E.g Pololu MinIMU, Adafruit IMU and Sparkfun IMUs
Git repository here
The code can be pulled down to your Raspberry Pi with;
We have left the code as simple as it can be to make it easier to understand.
The code currently performs angle measurements using the gyroscope and accelerometer , which are fused using a complementary filter. The heading is also calculated using the magnetometer, without tilt compensation.
To view pressure;
To view pressure;
Detailed Guides and Tutorials
In this order;
Guide to interfacing a Gyro and Accelerometer with a Raspberry Pi – Kalman Filter
Create a Digital Compass with the Raspberry Pi – Part 1 – “The Basics”
Create a Digital Compass with the Raspberry Pi – Part 2 – “Tilt Compensation”
Create a Digital Compass with the Raspberry Pi – Part 3 – “Calibration”
Create a Digital Compass with the Raspberry Pi – Part 4- “Smartphone Replica”
Converting values from an Accelerometer to Gs – “ Proper Acceleration”
How to Create an Inclinometer using a Raspberry Pi and an IMU
Raspberry Pi Digital Spirit Level
[wp_ad_camp_4]