Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

recogonize AK8963_ADDRESS #471

Open
vahidyazdnian13 opened this issue Nov 9, 2021 · 5 comments
Open

recogonize AK8963_ADDRESS #471

vahidyazdnian13 opened this issue Nov 9, 2021 · 5 comments

Comments

@vahidyazdnian13
Copy link

hi ! i used your study about MPU9250 and that was very useful. thank you in advance.

when i run the code : byte d = readByte(AK8963_ADDRESS, AK8963_WHO_AM_I); // Read WHO_AM_I register for AK8963
Serial.print("AK8963 "); Serial.print("I AM "); Serial.print(d, HEX); Serial.print(" I should be "); Serial.println(0x48, HEX);

i don't get 0x48 and instead i get 0. can you help me out how should i solve this problem ?
i am using a MPU9250 BMP280 SPI IIC/I2C 10DOF Acceleration Gyroscope Compass 9-Axis Sensor Board Module GY-91 along with Arduino uno.

@kriswiner
Copy link
Owner

kriswiner commented Nov 9, 2021 via email

@vahidyazdnian13
Copy link
Author

thank you for replying !
yes i use arduino UNO as master and yes i can see the MPU9250 on 0x71 and the WHO AM I for that is working properly but not for gyroscope.
i didn't get what u mean by enabling pass through I2C can you explain more please ?

Not sure, are you using I2C with the Arduino UNO as master? Do you see the MPU6500 on the I2C bus at 0x71? Did you enable pass through I2C?

On Mon, Nov 8, 2021 at 11:42 PM vahidyazdnian13 @.***> wrote: hi ! i used your study about MPU9250 and that was very useful. thank you in advance. when i run the code : byte d = readByte(AK8963_ADDRESS, AK8963_WHO_AM_I); // Read WHO_AM_I register for AK8963 Serial.print("AK8963 "); Serial.print("I AM "); Serial.print(d, HEX); Serial.print(" I should be "); Serial.println(0x48, HEX); i don't get 0x48 and instead i get 0. can you help me out how should i solve this problem ? i am using a MPU9250 BMP280 SPI IIC/I2C 10DOF Acceleration Gyroscope Compass 9-Axis Sensor Board Module GY-91 along with Arduino uno. — You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub <#471>, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABTDLKWAZ4NQAQYBLPQKZELULDGGTANCNFSM5HUSRWTQ . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

@kriswiner
Copy link
Owner

kriswiner commented Nov 9, 2021 via email

@vahidyazdnian13
Copy link
Author

thank you so much ! i didn't consider this point.
i have one more question. i am using the code in" MPU9250BasicAHRS" ,so i should add this point to it right? i am wondering if i should add a interrupt pin from MPU9250 to arduino or not ?

@vahidyazdnian13
Copy link
Author

From the initMPU9250 function https://github.com/kriswiner/MPU9250/blob/master/MPU9250_BME280_SPIFlash_Ladybug/MPU9250.cpp there is this bit: // Configure Interrupts and Bypass Enable // Set interrupt pin active high, push-pull, hold interrupt pin level HIGH until interrupt cleared, // clear on read of INT_STATUS, and enable I2C_BYPASS_EN so additional chips // can join the I2C bus and all can be controlled by the Arduino as master // writeByte(MPU9250_ADDRESS, INT_PIN_CFG, 0x22); writeByte(MPU9250_ADDRESS, INT_PIN_CFG, 0x12); // INT is 50 microsecond pulse and any read to clear writeByte(MPU9250_ADDRESS, INT_ENABLE, 0x01); // Enable data ready (bit 0) interrupt So check the data sheet/register map for the INT_PIN_CFG register. There is a bit there that allows I2C pass through so the host can communicate directly with the AK8193C. On Tue, Nov 9, 2021 at 11:23 AM vahidyazdnian13 @.> wrote:

thank you for replying ! yes i use arduino UNO as master and yes i can see the MPU9250 on 0x71 and the WHO AM I for that is working properly but not for gyroscope. i didn't get what u mean by enabling pass through I2C can you explain more please ? Not sure, are you using I2C with the Arduino UNO as master? Do you see the MPU6500 on the I2C bus at 0x71? Did you enable pass through I2C? … <#m_8598163716039909656_> On Mon, Nov 8, 2021 at 11:42 PM vahidyazdnian13 @.
> wrote: hi ! i used your study about MPU9250 and that was very useful. thank you in advance. when i run the code : byte d = readByte(AK8963_ADDRESS, AK8963_WHO_AM_I); // Read WHO_AM_I register for AK8963 Serial.print("AK8963 "); Serial.print("I AM "); Serial.print(d, HEX); Serial.print(" I should be "); Serial.println(0x48, HEX); i don't get 0x48 and instead i get 0. can you help me out how should i solve this problem ? i am using a MPU9250 BMP280 SPI IIC/I2C 10DOF Acceleration Gyroscope Compass 9-Axis Sensor Board Module GY-91 along with Arduino uno. — You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub <#471 <#471>>, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABTDLKWAZ4NQAQYBLPQKZELULDGGTANCNFSM5HUSRWTQ . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub . — You are receiving this because you commented. Reply to this email directly, view it on GitHub <#471 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABTDLKULG52ZO6XT5DUZ2MTULFYMDANCNFSM5HUSRWTQ . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

now i realized that the point you mentioned was in the last part of "initMPU920" function so i think it does enable it but my wiring is like what is mentioned in the top of the arduino code. is that ok ? what more should i do to solve this problem ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants