Hai,
I've tested the MPU6060 i2c gyro sensor with the demo code "MPU6050_6_Axis_sensor.gcb" to the pc terminal readings and works great.
When I wanted the values on a i2c SSD1306 display... it didn't work.
I noticed the code line #define USART_TX_BLOCKING while the SSD1306 is using the TX I think.
Is that the problem and how to solve it?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
#define USART_TX_BLOCKING can be removed. It is only used in the USART library and has no impact on I2C hardware or software operations.
So, the I2C MPU6060 device works. And, therefore this would mean the I2C data and clock lines are operating.... however, the SSD1306 GLCD typically come with I2C pullup resistors. So, I would remove any pullups you have to support the MPU6060 and test the MPU6060 with the GLCD on the I2C lines.
We know the SSD1306 library works. But, have you run an I2C discovery to ensure you can see both device on the I2C bus? and, to confirm the GLCD address.
So, I recommend a review of the pullups and i2C discovery.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hai,
I've tested the MPU6060 i2c gyro sensor with the demo code "MPU6050_6_Axis_sensor.gcb" to the pc terminal readings and works great.
When I wanted the values on a i2c SSD1306 display... it didn't work.
I noticed the code line
#define USART_TX_BLOCKING
while the SSD1306 is using the TX I think.Is that the problem and how to solve it?
#define USART_TX_BLOCKING
can be removed. It is only used in the USART library and has no impact on I2C hardware or software operations.So, the I2C MPU6060 device works. And, therefore this would mean the I2C data and clock lines are operating.... however, the SSD1306 GLCD typically come with I2C pullup resistors. So, I would remove any pullups you have to support the MPU6060 and test the MPU6060 with the GLCD on the I2C lines.
We know the SSD1306 library works. But, have you run an I2C discovery to ensure you can see both device on the I2C bus? and, to confirm the GLCD address.
So, I recommend a review of the pullups and i2C discovery.