I’m new in the Community.
I try to build a simple object that I could put anywhere on my bike and that could return me roll angle on a screen.
I managed to connect the 2560 board, MPU6050 and I2C screen. Everything work. I have some data to show with example codes on arduino software.
In my case, I only need roll angle.
As the sensor would be place randomly (not on a flat surface), the calibration process will allow to transform MPU6050 position (relative) to the roll angle of the bike (absolute).
First, I need the sensor to know its relative position.
I think I can have half the solution thanks to g acceleration. Il will have a value for the 3 vectors (x, y, z) if my sensor is not flat positionned.
The other half would be done by rolling the bike from one side to other side in order to have the axis of the absolute roll.
Then I should get some "correction factors" to compute to gyro x, gyro, y and gyro z values given by the sensor to show my absolute roll.
Question : Do you think I’m doing right or does a better way already exist ?
Thanks.