Giter Site home page Giter Site logo

m5gray_mpu6886_bmm150's Introduction

M5Gray_MPU6886_BMM150 for arduino IDE

This is M5Stack Gray MPU6886+BMM150 examples for arduino IDE.

HSI.jpg orientation


BMM150class.cpp and BMM150class.h were forked from omegatao's repository. Original link (platform IO based) https://github.com/omegatao/M5StackGrey_MPU6886_BMM150_AHRS_sample

What's New ?

  • Added soft iron distortion correction.

Simple and Effective Magnetometer Calibration Kris Winer edited this page on 15 Aug 2017 · 17 revisions

  • Added gyro offset calibration. However, built in M5.IMU.setGyroOffset(Ωx0,Ωy0,Ωz0) is not used. It starts automatically. (still has gyro drift. but reduced a little)
  • yaw tweaked 90 degrees (button A,B,C are front side)

Usages

  • Copy BMM150 folder into your arduino libraries folder.
  • Some .ino files are required lovyanGFX and lovyanlancher.
  • M5Stack-SD-Updater version must be 0.5.2 (1.x or higher will not work in my code. I don't know why) 1.0.x is OK now. Verified arduino 1.8.15
  • tilt_compass.ino is traditional tilt-compensated compass. Not using 9-AXIS quaternion.
  • Do not move or tilt your M5Stack during the gyro offset calibration.
  • Do not use this unit in situations involving safety to life.
  • - Not supported M5Unified library. (Consider M5Stack.h library depandency such as I2C, etc.)
  • Added example code using M5Unified library.

References

Revision history

  • 2021-Jan Initial release.
  • 2021-Feb updated Readme.md, added built in sensor's orientation images.
  • 2023-Jan Modified I2C part and added example code using M5Unified library.
  • 2024-Feb added destructor and year 2024 Ehou-roll.

Have fun !

m5gray_mpu6886_bmm150's People

Contributors

9peo0xnd avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

k2m5t2 mhaberler

m5gray_mpu6886_bmm150's Issues

platform and framework versions?

trying to build with platformio which works, but I2C handling of the BMMI150 fails

I get

rst:0x1 (POWERON_RESET),boot:0x17 (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:2
load:0x3fff0030,len:1184
load:0x40078000,len:13192
load:0x40080400,len:3028
entry 0x400805e4
[   725][E][Wire.cpp:499] requestFrom(): i2cWriteReadNonStop returned Error -1
[   728][E][Wire.cpp:499] requestFrom(): i2cWriteReadNonStop returned Error -1
[   731][E][Wire.cpp:499] requestFrom(): i2cWriteReadNonStop returned Error -1

which happens during BMMI150 setup and I guess its due to a different version of some library

these are the libraries I'm using:


Processing m5stack-core2 (platform: espressif32; board: m5stack-core2; framework: arduino)
------------------------------------------------------------------------------------------------------------------------------
Verbose mode can be enabled via `-v, --verbose` option
CONFIGURATION: https://docs.platformio.org/page/boards/espressif32/m5stack-core2.html
PLATFORM: Espressif 32 (6.1.0) > M5Stack Core2
HARDWARE: ESP32 240MHz, 4.31MB RAM, 16MB Flash
DEBUG: Current (cmsis-dap) External (cmsis-dap, esp-bridge, esp-prog, iot-bus-jtag, jlink, minimodule, olimex-arm-usb-ocd, olimex-arm-usb-ocd-h, olimex-arm-usb-tiny-h, olimex-jtag-tiny, tumpa)
PACKAGES: 
 - framework-arduinoespressif32 @ 3.20007.0 (2.0.7) 
 - tool-esptoolpy @ 1.40500.0 (4.5.0) 
 - toolchain-xtensa-esp32 @ 8.4.0+2021r2-patch5
LDF: Library Dependency Finder -> https://bit.ly/configure-pio-ldf
LDF Modes: Finder ~ chain, Compatibility ~ soft
Found 35 compatible libraries
Scanning dependencies...
Dependency Graph
|-- M5Unified @ 0.1.4
|-- M5GFX @ 0.1.5
|-- Preferences @ 2.0.0
|-- Wire @ 2.0.0
Building in release mode
Retrieving maximum program size .pio/build/m5stack-core2/firmware.elf
Checking size .pio/build/m5stack-core2/firmware.elf
Advanced Memory Usage is available via "PlatformIO Home > Project Inspect"
RAM:   [          ]   0.6% (used 26644 bytes from 4521984 bytes)
Flash: [=         ]   6.9% (used 450845 bytes from 6553600 bytes)
================================================ [SUCCESS] Took 4.74 seconds ================================================

what versions do you use?
can you post a build log?

thanks

Michael

ps: git repo https://github.com/mhaberler/M5Gray_MPU6886_BMM150.git

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.