本篇是基於ble_app_uart_bi-direction_test來延續加入新功能, 主要是新增了I2C Master Driver和對MPU6050 Acc/Gyro數值的讀取.
1. Test Video:
2. Test Code Download Link: (only support keil-mdk 5)
3. Softdevice Download Link:
4. Mergehex Tool Download Link:
5. Code flow:
- Add define for test command:
- "a" command: Output Acc Data
- "g" command: Output Gyro Data
- Implement "nus_data_handler" function for "a" & "g" command:
- Implement main loop flow:
6. I2C Signal:
3. Softdevice Download Link:
4. Mergehex Tool Download Link:
5. Code flow:
- Add define for test command:
- "a" command: Output Acc Data
- "g" command: Output Gyro Data
- Implement "nus_data_handler" function for "a" & "g" command:
- Implement main loop flow:
.\_build\nrf52840_xxaa.axf: error: L6047U: The size of this image (34892 bytes) exceeds the maximum allowed for this version of the linker
回覆刪除Hello, I am getting this error. Please help.
Hi, Do you use free version of Keil-mdk? If yes, it will have code size limitation, thanks.
刪除Hi, How did you wire the MPU6050 with the nrf development board?
回覆刪除Hi:
刪除MPU6050 SCL -> EVB P0.27
MPU6050 SDA -> EVB P0.26
MPU6050 VDD -> EVB 3V
MPU6050 GND -> EVB GND
Hi, how can I add an option of reading Magnetometor values as well?
回覆刪除Hi:
刪除You mean is reading magnetometor value from mpu6050? or adding a magnetometor sensor into this project?
Have a nice day,
JustinWang
Hello, i need to get value from the magnetometor of mpu6050, I get values of accelerometer and gyroscope, but it doesnot show my magnetometer values. But i added the function to read magn values.
回覆刪除Thanking in advance.
Hi:
刪除The MPU6050 only have acc and gyro sensor, so you can't get magnetometer value from MPU6050.
You can add a new magnetic sensor into I2C bus to get the magnetometer value.
Have a nice day,
JustinWang
Hello. Thank you for your code. I was trying to run the code in segger embedded studio version 17.0.2. The code builds completely. I can see that the ble is connected to mobile device. But I see no data from MPU. The output in the app is somethink like this: "A: ; ; ". Can you please help me in this issue? Thanks in advance.
回覆刪除Hi:
刪除Can you read some register(e.g., Who_Am_I) to check the MPU6050 board and I2C Bus is workable?
I think we need to check the hardware is ok or not first.
Have a nice day.