Note, that most i2c device libraries only talk to the first i2c device (
Wire), which is on pins 19 (SCL) and 18 (SDA). If the library doesn't have support for alternate i2c buses, you will either need to put all of the devices on the first i2c bus. Or you need to clone the library, and rename it. Within the cloned library, you would change all references of '
Wire' to '
Wire1', '
Wire2', or '
Wire3' as appropriate.
On the 3.2/3.5/3.6, there are alternate pins 17 (SCL) and 16 (SDA) for the first i2c bus (
Wire). You would need to use the '
Wire.setSDA' and '
Wire.setSCL' functions to change to the alternate pins.
There is an alternate i2c library (
https://forum.pjrc.com/threads/21680-New-I2C-library-for-Teensy3) that may provide some additional features over the standard library.
In each distinct i2c bus, if none of your devices have pull-up resistors, you will need to add two pull-up resistors (one between SDA and 3.3v and the other between SCL and 3.3v). On 3.3v microprocessors like the Teensy, you can typically use 2.2k resistors. If a device is meant to be run on either 3.3v or 5v, it may have a 4.7k resistor.