This is actually what I’m trying to accomplish: continuously change every LED to the same color at once. Thanks! ]]>

Since I cannot delete my comment I will have to respond to my own comment. On further investigation, I realized that you were right on the gyro bias as well. The time step is being taken care of by the F matrix when transitioning from the previous P covariance matrix to the current a priori P matrix. ]]>

I also noticed the mistake with Q_angle. The accelerometer does not accumulate noise and should therefore not be multiplied by dt. But I do think the Q_gyrobias should be multiplied with dt. If dt is not constant, the gyro drift will be different each timestep.

Did you do any measurements with your code to see if you get a better signal with your calculations?

]]>Please feel free to contact me at mail@tkjelectronics.dk ]]>

Thank You ]]>

Yes I used a PID controller. Please see: https://github.com/TKJElectronics/Balanduino/blob/master/Firmware/Balanduino/Motor.ino. ]]>

All the source code is available on Github: https://github.com/TKJElectronics. Please have a look there. ]]>