SH200Q vs. MPU6886 vs. IMU scaling
-
Hi,
I'm using the integrated IMU and found that the default accelerometer scale of 8G is too big, 4G or even 2G would be better. There is no support in the IMU class for setting the scale, and the current SH200Q and MPU6886 classes are incompatible: MPU6886 has AFS_2G as the first item in the enum, but SH200Q doesn't have a placeholder, and begins with AFS_4G (besides the former one having it public while the latter is protected). I understand the different hardware capabilities, but it seems to be too much effort to extend the IMU class to handle this well.
What is your opinion? Is anybody interested in a general solution, or the number of SH200Q devices is so small, I can safely go with the MPU6886 class matching my hardware? -
@mdevel1 The minimum acceleration measurement range of SH200Q is ± 4g. For details, you can refer to this datasheet.
link:https://m5stack.oss-cn-shenzhen.aliyuncs.com/resource/docs/datasheet/core/SH200Q_en.pdf
-
@m5stack said in SH200Q vs. MPU6886 vs. IMU scaling:
@mdevel1 The minimum acceleration measurement range of SH200Q is ± 4g. For details, you can refer to this datasheet.
Thanks, I've read the datasheet, but there is no general way to set the 4G scale through the IMU class. The only way is to detect the hardware, and duplicate the functionality of the IMU class for both chips (and inherit one from SH200Q class). I would like to use a general method, but since I only own MPU6886 versions, my code will be specific to this. If others have interest, this might change, so this is the reason behind my original question. I don't want to invest time to create more divergent code as my other two pull requests remained unanswered yet.
-
@mdevel1 The only way is to detect the hardware