How to use PaHub and PbHub at the same time?
-
I'm trying to connect multiple I2C units(red, for example joystick, Env II and Color) and I/O units(black, such as Angle, Light, and Dual Button) to the FIRE. But both PaHub and PbHub are using the PortA. Is there any way that I can make them work? My plan is to connect PaHub to PortA and connect PbHub to one of the channels on PaHub. My question is how to get the values from each unit. I'm using the Arduino IDE.
Thank you very much! -
Hello @raychmond
in order to connect multiple I2C units you don't necessarily need a PaHub - you can simply connect them all in parallel using one or more HUB expansion Units. (A PaHub only is required if you wish to connect two I2C units which have the same I2C address.)
In your case that should work as the I2C units you mentioned all have a different I2C address:
M5Stack Fire |-- HUB Expansion |-- JoyStick (0x52) |-- Env II (0x44, 0x76) |-- HUB Expansion |-- Color (0x29) |-- PbHub (0x61)
Thanks
Felix -
@felmue That makes total sense! Thank you so much!
I replaced the PaHub with the Hub expansion unit. Everything works now.