m5stack / m5-docs

The URL of M5Stack Official Documents:
http://docs.m5stack.com
MIT License
214 stars 79 forks source link

M5StickC Error 31 MPU6886 error #163

Closed BrendanSimon closed 3 years ago

BrendanSimon commented 4 years ago

I'm following the instructions to use VS Code with M5.

I've erased and burnt the firmware using the EasyLoader_M5StickC_FactoryTest.exe

I'm getting the following error on the M5StickC.

ERROR 31
--------------------
MPU6886 error
check Hardware

m5StickC-Error-31-MPU6886-error

Sounds like the firmware can't get a response from the MPU6886 device.

I can't see any files in VS Code either. When I click on the COM8 (my com port for M5StickC) then vscode just spins forever but nothing appears. I'm guessing that might be because of the ERROR above.

How can I resolve this ERROR 31. Do I need to send the unit back or get a new one? Or is there something I can do to try and get it working?

Is there different firmware I can try?

NOTE: I really need the MPU6886 as my application will process accelerations in all 3 axis.

Thanks, Brendan.

EiichiroIto commented 4 years ago

Hello. I got same error message yesterday. M5StickC has two variants, with MPU6886 and with SH200Q for IMU. So if you have M5StickC with SH200Q. the error message occurs. (flip your device to see which one) Because M5StickC IMU library detect two IMUs. You can use IMU in your program. Thank you.

estherDow commented 4 years ago

This resolution does not really help us in any way. The IMU example doesn't detect anything, neither do the other two examples. Factory example gets me error 31.

EDIT SOLVED: I was able to trace my issue to Arduino using the wrong wire.h library. user Stickbreaker has contributed a lot of information on this issue, I recommend his repos for further reading.

BrendanSimon commented 4 years ago

ok. I flipped the device and it does say SH200Q on the sticker.

So, how do I get this working with VSCode so I can develop with MicroPython? Is there different or updated firmware?

EiichiroIto commented 4 years ago

In C/C++, use M5.IMU object. In MicroPython, following code can help you. https://qiita.com/Lathe/items/3951f75688aa8fd6f56c