Atom with two ultra sonic units.
-
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!
-
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.
-
If you use the PaHub (i2c) you should be able to connect two US units to the same port.
-
PaHub is I2C but I'm afraid that ultrasonic units with trig and echo are not I2C so won't work with PaHub
-
@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 -
@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.
-
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 -
-
@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