Menu

MPU6060 I2C for SSD1306 display

Haroen
2023-04-18
2023-04-18
  • Haroen

    Haroen - 2023-04-18

    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?

     
  • Anobium

    Anobium - 2023-04-18

    #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.

     

Log in to post a comment.