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

    Atom with two ultra sonic units.

    Atom
    5
    9
    11.8k
    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.
    • B
      bwubs
      last edited by

      I want to build a project that requires 2 ultra sonic units. The atom would be perfect for this project. The problem is that it has only one grove connector. I’ve seen splitters that are available. I want to know if these splitters work with two of the same unit attached? Can the units be addressed differently or do they share the same address? I want to know this as for my project I need to know which sensor triggers first.

      Thanks!

      1 Reply Last reply Reply Quote 0
      • R
        robalstona
        last edited by robalstona

        If you work with uiflow you can add second module in add unit section, then you select custom port and enter pins which you will use. But you must connect it to other avialable pins at bottom of atom. You must also know what pins may work as input for ECHO signal (not all can do). Later you place block from units - distance and select which sensor you would use ultrasonic1 or ultrasonic 2.

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

          If you use the PaHub (i2c) you should be able to connect two US units to the same port.

          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
          • C
            ciconde
            last edited by

            PaHub is I2C but I'm afraid that ultrasonic units with trig and echo are not I2C so won't work with PaHub

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

              @ciconde I take it that you are not using the M5Stack US units?
              https://m5stack-store.myshopify.com/collections/m5-unit/products/ultrasonic-distance-unit-rcwl-9600?variant=36550631424164

              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
              • B
                bwubs
                last edited by

                @ajb2k3 thanks for your reply. Does this only work with the hub? Or also with splitters like this one: https://www.tinytronics.nl/shop/nl/platforms/m5stack/accessoires/m5stack-grove-t-connector-5-stuks ? The hub is a bit big for what I want to do.

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

                  Hello @bwubs

                  a simple splitter doesn't work in this case. The ultrasonic units use I2C with address 0x57. And since you plan to use two of them, both will have the same address. For I2C communication to work properly each participant needs to have its own unique address. That is where the PaHub comes into play. It can resolve the issue where two participants have the same address by activating only one of them at the same time.

                  Thanks
                  Felix

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

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

                    @bwubs No, they wont work as you need an I2C hub as @felmue points out.

                    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
                    • C
                      ciconde
                      last edited by

                      @ajb2k3 I wasn't aware of ultrasonic I2C!
                      Wonderful!!!

                      Here I've only been able to find GPIO ones

                      Thank you veyr much for clarification

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