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

    How to use PaHub and PbHub at the same time?

    Units
    2
    3
    4.5k
    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.
    • R
      raychmond
      last edited by

      I'm trying to connect multiple I2C units(red, for example joystick, Env II and Color) and I/O units(black, such as Angle, Light, and Dual Button) to the FIRE. But both PaHub and PbHub are using the PortA. Is there any way that I can make them work? My plan is to connect PaHub to PortA and connect PbHub to one of the channels on PaHub. My question is how to get the values from each unit. I'm using the Arduino IDE.
      Thank you very much!

      1 Reply Last reply Reply Quote 0
      • felmueF
        felmue
        last edited by

        Hello @raychmond

        in order to connect multiple I2C units you don't necessarily need a PaHub - you can simply connect them all in parallel using one or more HUB expansion Units. (A PaHub only is required if you wish to connect two I2C units which have the same I2C address.)

        In your case that should work as the I2C units you mentioned all have a different I2C address:

        M5Stack Fire
         |-- HUB Expansion
              |-- JoyStick (0x52)
              |-- Env II (0x44, 0x76)
              |-- HUB Expansion
                   |-- Color (0x29)
                   |-- PbHub (0x61)
        

        Thanks
        Felix

        GPIO translation table M5Stack / M5Core2
        Information about various M5Stack products.
        Code examples

        R 1 Reply Last reply Reply Quote 0
        • R
          raychmond @felmue
          last edited by

          @felmue That makes total sense! Thank you so much!
          I replaced the PaHub with the Hub expansion unit. Everything works now.

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