m5stack / M5_BMM150

MIT License
4 stars 1 forks source link

I2C address not found #2

Open titanX108 opened 1 month ago

titanX108 commented 1 month ago

I am using the IMU PRO unit with M5Stack. The address for the BMM150, 0x10 is not found with I do an I2c scan. The product page clear Three-axis Geomagnetic Sensor (BMM150) I2C Address: 0x10 but it not visible whn I do a I2C scan. The display shows the BMM150 init failed.

Please tell me if there is a setting I need to set for the IMU Pro unit, because I cant use a code such as this library directly since the I2C address is not found for the BMM150 sensor on your M5Stack IMU PRO UNIT.

Tinyu-Zhao commented 1 month ago

Please make sure that the Unit is connected to a 5V output and that you are using the correct sda and scl ports.

Tinyu-Zhao commented 1 month ago

By the way, why don't you use IMU PRO's proprietary library? https://github.com/m5stack/M5Unit-IMU-Pro-Mini/tree/main/examples

titanX108 commented 1 month ago

20240805_152906 As you can See in the photo, I connected it to Port A with 5v. I have not modified any hardware I'm using the example I2C tester. The scan only shows 0x68 for the BIM270, 0x76 for the BMP280 and 0x75 for the power module. BMM150 is not showing on 0x10 as https://docs.m5stack.com/en/unit/IMU%20Pro%20Mini%20Unit says.

I want to directly call the BMM150 sensor to use other libraries like your M5_BMM150.h, but i cant since its not evening showing up. What is the reason for this? I also want to do calibration for the magnetic Sensor. Is there way to do this?

Tinyu-Zhao commented 1 month ago

bmm150 default in sleep mode, this library integrates bmm150, you run the example will be able to output bmm150 data normally.

This library may not be maintained separately in the future. It is recommended that you use this library.

https://github.com/m5stack/M5Unit-IMU-Pro-Mini/blob/002b74a8b80464beb72d3528cb831a6915ec8a25/examples/getSensorData/getSensorData.ino#L77-L88

titanX108 commented 1 month ago

The issue with that library is it doesn't have the function for calibration the sensor or addressing the BMM150 separately.

[M5_BMM150] this library has the function but cant recognize the sensor on the IMU PRO Unit.