m5stack / M5Core2

M5Core2 Arduino Library
MIT License
263 stars 115 forks source link

PbHUB: add constructor with I2C addr #46

Closed felmue closed 2 years ago

felmue commented 3 years ago

This allows to connect multiple PbHUB to the same I2C bus. Backwards compatible with existing code using only one PbHUB.

tobozo commented 3 years ago

nice :+1:

It would be nice to also be able to use PdHUB on different pins (e.g. with M5GO Bottom2).

Implementing a secondary PdHUB::begin( int sdaPin=SDA, int sclPin=SCL ); could solve that.