Hi everyone,
apologies if this question has been discussed before - I tried my best searching the forum but could not find anything.
I’m trying to build a pitch/roll indicator for my 4WD vehicle using an Arduino Mega, the AltIMU-10 v5, and the MinIMU-9 + Arduino AHRS code provided by Pololu. The sensors are reasonably well calibrated and I’m getting readouts that seem correct. My problem is the following:
With the provided code, the board needs to sit flat for a few seconds after powering up to get baseline readings. Obviously this is not possible once I put everything in the car. I would like to be able to zero the unit while being parked on a flat surface, write these values to the Arduino EEPROM, and then use them as an offset reference everytime I start the car.
Is this generally possible? If I understand it correctly, the gyro alone cannot do this, but that I need to use it in conjunction with the accelerometer. How can I implement this? Can this be easily done by modifying the MinIMU code or would I have to start from scratch?
FYI, I’m not terribly eperienced in these things…
Cheers,
Jan