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

    I2C on TAB5

    Scheduled Pinned Locked Moved General
    3 Posts 3 Posters 2.4k Views
    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 Offline
      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 Offline
        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 Offline
          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, M5CardputerAdv, M5StackChan

          1 Reply Last reply Reply Quote 0

          Hello! It looks like you're interested in this conversation, but you don't have an account yet.

          Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

          With your input, this post could be even better 💗

          Register Login
          • First post
            Last post