KerJoe / MPU6050-Cemuhook-gyro

Gyroscope for Cemuhook based on ESP8266 microcontroller and MPU6050 accelerometer and gyroscope IC
14 stars 6 forks source link

Wrong gyroscope info after shake #3

Closed doteq closed 2 years ago

doteq commented 2 years ago

First of all thank you so much for this project, when I found it, I've got a smile on my face that someone already did most work for me! However, I have an issue and I couldn't fix it by myself. When I'm gently rotating MPU6050 it works flawlessly, without drift or clipping. dX5QTg2Ie1 Although, when I shake it or just make some more intense movements, rotation shown by padtest is incorrect and the controller starts to drift vGqYRUKwfM (Note, that the position and rotation on the beggining and the end of gif are the same and it's in constant position on the end) Do you have any ideas what I might have done wrong and how to fix it?

KerJoe commented 2 years ago

I see that you've closed the issue, but I'll comment anyway.

You can increase the gyro's range by changing gyroSens from 2 to 3. You can also (probably) fix it by decreasing the dataSendDelay, too.

doteq commented 2 years ago

Yeah, changing sensitivity worked for me. Also, i found out, that joycons use ±8g acceleration range, so I changed that in the code. Hope it will help someone.