Reply To: [Resolved]Unable to open I2C bus

Home Forums Forums Technical Support for BerryIMU [Resolved]Unable to open I2C bus Reply To: [Resolved]Unable to open I2C bus

#3988
Mark Williams
Keymaster

play around with the complimentary filter constant
#define AA 0.97 // complementary filter constant
This controls how much of the gyro or the accelerometer is used in the fused angle.
lowering the value will result in a faster correct angle result.

Regarding speed;
If you are using a PiScreen to display this output, try increasing the speed the PiScreen by changing the speed value in /boot/config.txt

dtoverlay=piscreen,speed=16000000,rotate=90

try 32000000.. if the colors dont look right, try 24000000. You will have to reboot to for the change to take effect.

You can also try lowering the delay in the loop;
#define DT 0.2 // loop period. 0.2 = 200ms
It is currently set to 200ms... remember that you need to keep a constant loop time, otherwise your gyro angle will drift too much. The loop time is the first value printed out to the console.

Mark --OzzMaker.com --

Blip, blop, bloop...