m5stack / M5StickC-Plus

M5StickCPlus Arduino Library
MIT License
368 stars 89 forks source link

How to use MPU6886 #5

Closed WebSamuraiDaisuke closed 3 years ago

WebSamuraiDaisuke commented 3 years ago

MPU6886 works in M5stickC by M5.MPU6886.getAccelData(&accX, &accY, &accZ); So I write M5.IMU.getAccelData(&accX, &accY, &accZ);, but it get result "X is:0.00 Y is:0.00 Z is:0.00" in Plus. How can I get values from MPU6866 in Plus?

felmue commented 3 years ago

Hello @WebSamuraiDaisuke

Try calling M5.IMU.Init(); before using the MPU6886.

Thanks Felix

Gitshaoxiang commented 3 years ago

we already add an example.