🤖Have you ever tried Chat.M5Stack.com before asking??😎
    M5Stack Community
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Register
    • Login

    I2C on TAB5

    General
    3
    3
    781
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • P
      Powersoft
      last edited by

      I need to connect SDC40 from M5Stack to the TAB5. Wich port is the one to use to connect the SCD40.

      Is there an example how to use the I2C with the TAB5

      W 1 Reply Last reply Reply Quote 0
      • W
        Wolfo @Powersoft
        last edited by

        As no one Answered. I have a MS5637 barometric sensor on the Tab5 through the Port.a.

        The configuration that i used to communicate with it was these:

        M5.Ex_I2C.begin(); // Initialize I2C for MS5637 with SDA=GPIO53, SCL=GPIO54
        Wire.begin(M5.Ex_I2C.getSDA(), M5.Ex_I2C.getSCL()); // Reconfigure default Wire to use M5.Ex_I2C pins
        barometricSensor.begin(Wire);
        

        I'm not even sure if everything is needed but it works.

        robskiR 1 Reply Last reply Reply Quote 0
        • robskiR
          robski @Wolfo
          last edited by

          I2C on Tab5 as example used with ENV3 sensor

          i2c0 = I2C(0, scl=Pin(54), sda=Pin(53), freq=100000)
          env3 = ENVUnit(i2c=i2c0, type=3)

          M5StickC, M5StickCPlus, M5StickCplus2,M5GO, M5Core, M5Tough, M5Core2, M5 Demo Board, M5Dial, M5Paper, M5Atom, M5Cardputer, M5StampS3, CoreMP135, StamPLC, AirQ, M5Tab

          1 Reply Last reply Reply Quote 0
          • First post
            Last post