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

    Change the I2C address of a Kmeter Unit

    Units
    3
    6
    6.3k
    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.
    • M
      meirmark
      last edited by

      Hi.
      I need to connect 25 Kmeter Unit to one M5stack.
      Is there a simple way to change the I2C address of the unit ?

      Thanks.

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

        Hello @meirmark

        from what I can tell the I2C slave address is defined within the internal Kmeter Unit firmware running on the internal ESP32C3. So changing the I2C slave address means creating a new firmware.

        One way would be to compile 24 different versions of the internal firmware (with 24 different I2C slave addresses) and then flash / update 24 Kmeter Units. (Leaving one Kmeter Unit with the original I2C slave address.)

        As an alternative you could modify the internal firmware and add an additional I2C command which would allow to modify the I2C slave address. You still would need to flash all your Kmeter Units (but at least all with the same firmware). Then, using this new I2C command, you'd need to modify the I2C slave address of at least 24 Kmeter Units.

        Thanks
        Felix

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

        1 Reply Last reply Reply Quote 0
        • ajb2k3A
          ajb2k3 @meirmark
          last edited by

          @meirmark said in Change the I2C address of a Kmeter Unit:

          Hi.
          I need to connect 25 Kmeter Unit to one M5stack.
          Is there a simple way to change the I2C address of the unit ?

          Thanks.

          You could try using multiple I2C hubs

          UIFlow, so easy an adult can learn it!
          If I don't know it, be patient!
          I've ether not learned it or am too drunk to remember it!
          Author of the WIP UIFlow Handbook!
          M5Black, Go, Stick, Core2, and so much more it cant be fit in here!

          1 Reply Last reply Reply Quote 0
          • M
            meirmark
            last edited by

            Thanks.
            Do you know if the firmware source is available ?

            Meir.

            1 Reply Last reply Reply Quote 0
            • M
              meirmark
              last edited by

              Problem solved.
              To change the I2C address of a Kmeter one need to write to register 0x08 the new address (one byte) and to register 0x09 the same address but with the bits converted (1 is 0 , 0 is 1).
              After writing cycle the power.
              Thanks to M5 technical help team.

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

                Hello @meirmark

                good to know. Thanks for sharing and sorry I missed that in my previous answer.

                Thanks
                Felix

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

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