Is it possible to use more than one I2C Unit with AtomS3R? (Like AtomS3R + RFID Unit + Dual Button Unit
-
Hi,
I am new to M5Stack and I tried to make a quick setup with a AtomS3R + RFID Unit + Dual Button Unit. I am using UIFlow 2.
So far I was able to make some "hello world" setup where only one unit was connected to the AtomS3R (1: AtomS3R + Dual Button 2: AtomS3R + RFID Unit). These setups worked right from the start.
Now I want to connect both Units (Dual Button + RFID Unit) to the AtomS3R. But the code crashes. I tried different cabling options / coding options (with Pa.Hub or Groove Hub). No matter what I do, there is always a code error.
So before starting to discuss my code / cabling here, my question is:
Is it generally possible to connect more than 1 I2C unit to an AtomS3R ?
Thanks!
-
Hello @Rusticus42
yes, it is possible to connect more than one I2C unit. However Dual Button unit is not an I2C unit. You can see that from the color of the connector.
- I2C units have a red connector
- I/O units have a black connector
- UART units have a blue connector
The connector on AtomS3R is white which meas it can be setup for I2C, I/O or UART mode, but only one at the time.
Thanks
Felix -
in simple terms you can't mix diff types(colours) of connectors on same device port,
-
Hello @Rusticus42
there is a solution: use a M5PbHub unit (which is an I2C unit) to read the button states of the Dual Button unit.
I created an example in the UIFlow2 Project Zone: M5AtomS3_RFID_PbHub_DualButton_Test_UIFlow2.3.7
Note: I do not have an M5AtomS3R so you probably need to adapt the example.
Thanks
Felix