有的,我有用邏輯分析儀去讀,數值一開始為Setup Write to ['208']+ACk, K+ACK,'128'+ACK,Setup Write to ['208']+ACk, K+ACK,'0'+ACK......Setup Write to ['208'],我得I2C,MPU6050_I2C_ADDRESS 0xD1 ,我的MPU板子上是寫MPU-92/65,因為看了你的範例,我就直接用MPU6050去改,因為我自己加入MPU9250的lib都失敗,所以我用的方法是讀mpu6050的A與G值,在寫一個AK8963來讀,不知這樣是否有誤,或是我可以跟你要gmail會比較好討論可以嗎?
I saw this post and I apply it in the nRF52832. I added another function to read the Gyroscope axis and I only got 0 in the tree axis, I did it just I show you below:
Sorry for the late reply, your sensor is MPU6050 too? Maybe you are not enable Gyro sensor, so can't get any data. I need some time to setup on my side, then I can help you.
It seems the troble comes out when I share the I2C bus lines with other sensor. I don't know why... Testing the MPU olone works. Testing MPU and magnetometer sharing the I2C bus don't work only the Gyroscope...
這篇對我幫助很大,我自己也做了延伸,不知您那邊是否有MPU9255可以測試,我用你的程式進行修改寫程九軸控制,但是M軸就是用AK8963一直都沒有值是否能求救~Please
回覆刪除Hello Patrick:
刪除1. 你有用示波器或是邏輯分析儀去看一下為何沒有數值嗎? 是ak8963的i2c address設定錯了才沒有值, 還是有讀成功但數值永遠都是0, 建議你先做初步的分析.
2. mpu9250已經內建m sensor了, 你是讀不到內建的m sensor data, 還是讀不到外接的ak8963 data?
Have a nice day,
JustinWang
有的,我有用邏輯分析儀去讀,數值一開始為Setup Write to ['208']+ACk, K+ACK,'128'+ACK,Setup Write to ['208']+ACk, K+ACK,'0'+ACK......Setup Write to ['208'],我得I2C,MPU6050_I2C_ADDRESS 0xD1 ,我的MPU板子上是寫MPU-92/65,因為看了你的範例,我就直接用MPU6050去改,因為我自己加入MPU9250的lib都失敗,所以我用的方法是讀mpu6050的A與G值,在寫一個AK8963來讀,不知這樣是否有誤,或是我可以跟你要gmail會比較好討論可以嗎?
刪除Hello patrick:
刪除If you have any problem, you can send mail to me, my e-mail address is "wangwewe@mirlab.org",
thanks.
Have a nice day,
JustinWang
ok,many thank
刪除Hello. Thanks for your works.
回覆刪除I want to add virtual com port (Bluetooth Serial Port), When nRF52832 is connected. How Can I do this?
Hello:
刪除Do you mean you want to use nRF52 to do Virtual Com-Port?
If yes, you can use ble uart example code on nRF52 SDK.
Have a nice day,
JustinWang
作者已經移除這則留言。
回覆刪除Hello Justin
回覆刪除I saw this post and I apply it in the nRF52832. I added another function to read the Gyroscope axis and I only got 0 in the tree axis, I did it just I show you below:
void MPU6050_GetGyroData(float *gyr)
{
uint8_t tmp[6] = {0};
int16_t tmp_int[3] = {0};
i2c_read(MPU6050_I2C_ADDRESS ,MPU6050_GYRO_XOUT_H, tmp, 0x06);
tmp_int[0] = (int16_t)((tmp[0]<< 8) | tmp[1]);
tmp_int[1] = (int16_t)((tmp[2]<< 8) | tmp[3]);
tmp_int[2] = (int16_t)((tmp[4]<< 8) | tmp[5]);
}
And I call it in main program just like this:
// Enter main loop.
for (;;)
{
MPU6050_GetGyroData(MPU6050_Gyr);
memset(PrintBuffer,0x00,sizeof(PrintBuffer));
sprintf(PrintBuffer, "x:%.2f\r\n", MPU6050_Gyr[0]);
length = strlen(PrintBuffer);
err_code = ble_nus_string_send(&m_nus, PrintBuffer, length);
nrf_delay_ms(1000);
power_manage();
}
Did you solve this issue? If yes please share us how you did it. Thanks for your supporting
Hi there:
回覆刪除Sorry for the late reply, your sensor is MPU6050 too?
Maybe you are not enable Gyro sensor, so can't get any data.
I need some time to setup on my side, then I can help you.
Have a nice day,
JustinWang
Hi Justin thanks for your Reply.
刪除Yes, Actually I am using the MPU6050, I will be waiting your answer then.
Thanks a lot again.
作者已經移除這則留言。
刪除Hello:
刪除Please use below link to test acc+gyro, thanks.
https://drive.google.com/file/d/1YJd1kIGkjHj3KGkJI5RYJXYOZnoT0sfy/view?usp=sharing
Have a nice day,
JustinWang
Solve!
回覆刪除It seems the troble comes out when I share the I2C bus lines with other sensor. I don't know why... Testing the MPU olone works. Testing MPU and magnetometer sharing the I2C bus don't work only the Gyroscope...
Hi:
刪除1. You can check the I2C address of every sensor, maybe MPU6050's I2C address is same with other sensor.
2. Check your pull-high resistance is ok or not.