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

    More than one of the same units on an I2C-Bus?

    UIFlow
    4
    5
    7.6k
    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
      Peter
      last edited by ajb2k3

      For some units the I2C address can be changed, so that several identical units can be controlled via one I2C bus. Unfortunately I have not found a way to change the address in UIFlow or micropython.
      With the PaHUB this can be avoided, but how can I control several PaHUB?
      I am very reluctant to switch to the Arduino IDE. There it seems to work. Why not in Micropython?

      1 Reply Last reply Reply Quote 0
      • IAMLIUBOI
        IAMLIUBO
        last edited by

        Hi @Peter ,
        For us, the I2C address of most units is fixed so that you can use it directly. If you want to use multiple units with duplicate addresses, it is recommended that you use PAHUB, which can provide up to 5 I2C devices with the same address. Into. If you want to use multiple PAHUBs at the same time, you may need to change the position of some resistors. However, UIFlow does not currently support the selection of PAHUB addresses. We may update them in a future version.
        0_1616051091759_5203e95b-8d80-45ed-86ec-96b3c38994bb-image.png
        0_1616051114919_3ca2e8f8-65c4-4d98-b6bd-5c8c7c7a9ffa-image.png

        P 1 Reply Last reply Reply Quote 1
        • P
          Peter @IAMLIUBO
          last edited by

          @iamliubo
          Thank you for the information. I was aware of the address change in the hardware. That a corresponding adjustment in the UIFlow Ide is planned fills me with joy.

          1 Reply Last reply Reply Quote 0
          • L
            luex
            last edited by

            Hmmm.
            I purchased 6 watering/soil moisture units... I really would wish to get practical advice how to address these units with the same controller... i am willing to learn with either uiflow/python or arduino/c..

            Thanks for inputs,
            Alex

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

              Hello @luex

              may I suggest you start small? (my apologies if you already have done that.)

              • setup the build environment (Arduino, PlatformIO, UIFlow, ...)
              • get familiar with your M5Core device
              • build, download and run some simple examples (blinking an LED, put some text on screen, ...)
              • now try to setup one watering/soil moisture unit using the provided example
              • only if that all works try to setup multiple of them

              BTW: the watering/soil moisture unit does not use I2C to communicate therefore the discussion in this thread is probably not really helpful for your situation.

              Good luck!

              Felix

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

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