Closed FreaktheBear closed 4 weeks ago
Dear Mika, If I do a I2C scan the GY-9250 board is found with address 0x68. If I use the Kevin Wheeler repo and run the simple_test.py, the following output is given:
[104]
Traceback (most recent call last):
File "
If I look into the mpu6500.py code I see that the address is set to 0x68:
class MPU6500: """Class which provides interface to MPU6500 6-axis motion tracking device.""" def init( self, i2c, address=0x68, accel_fs=ACCEL_FS_SEL_2G, gyro_fs=GYRO_FS_SEL_250DPS, accel_sf=SF_M_S2, gyro_sf=SF_RAD_S, gyro_offset=(0, 0, 0) ): self.i2c = i2c self.address = address
Dear Mika,
Was reading some of the other posts which seem to be similar. How can I run this whoami test to see what hex address it returns?
Kind regards
Dear Mika,
ChatGPT wrote the following basic library and main routine: https://github.com/FreaktheBear/ChatGPTmpu9250/tree/main
I can confirm that all three components (gyro, accelaro, magneto) provide output data. Do you have any suggestions to get this board: https://surplustronics.co.nz/products/8352-9-axis-altitude-gyro-accelerator-magnetometer-sensor-module working with your code? I am running it on a Raspberry Pi Pico.
Kind regard
What kind of problem do you have?
Hi Mika,
Thanks for getting back to me. Over the past days I have been doing extensive testing and debugging, and at the moment I can only conclude that I am dealing with a "fake" MPU9250 chip. The whoami query returns with 0x75 and I read that the original TDK InvenSense chip-set nr. is 0x71.
The magnetometer won't work and I read reports from other people having the similar issues. Mainly I get a breakpoint when the (library) code tries to access the magnetometer over I2C.
The fact that the "basic" ChatGPT mockup showed some fixed magneto values (they are not updating, only accel/gyro values do), made my think that the chip might work, as the values fall within the microTesla limits and the values are negative as I am on the Southern Hemisphere (hope I am correct with this statement:)
I tested the device also under Python on a Raspberry Pi 4B with the imusensor library and this only showed updating accel/gyro values but the magneto values remain zero.
For now I will leave this and fall back to a separate magnetometer which they sell here, in "series" with a MPU6050 chip on I2C.
Cheers
Hi Mika,
Just received a new MPU9250 with a working magnetometer this time. Thanks again for your extensive work.
Kind regards
Dear Mika, I get the following error codes when I try to run the first code snippet and also with the simple_test.py code from Kevin Wheeler. I watched his whole video but I cannot detect what I am doing wrong. My GY-9250 breakout board has address 0x68 and I also tried to change the address in line 36: _INT_PIN_CFG = const(0x37) to _INT_PIN_CFG = const(0x68)
Terminal info: Traceback (most recent call last): File "asyncio/core.py", line 1, in run_until_complete File "", line 84, in read_MPU9250
File "mpu9250.py", line 45, in init
File "mpu6500.py", line 97, in init
File "mpu6500.py", line 149, in whoami
File "mpu6500.py", line 181, in _register_char
Kind regards