setSCL and setSDA only work to set the corresponding functions pin, but that pin MUST be a valid pin for that Wire buss.
On T4.x I am not sure if we have very many of them.
Wire: Pins 18 and 19
Wire1: (defaults)17, 16,
Actually there are a couple more pins here
T4 - 36(SDA) 37(SCL)
T4.1 - Code needs update Is pins 44 and 45...
Wire2: 24, 25
Now On TLC
You have: Wire SDA(18,17) SCL(19,16), Wire1: SDA(23) SCL(22)
For T3.x - It again depends on which one... They have different number of Wire objects and pins. Some details on
main PJRC page:
https://www.pjrc.com/teensy/techspecs.html
Which pins shown on the different cards.
T3.2: Wire SDA(18,17) SCL(19,16) Wire1: SDA(30), SCL(29)
T3.5 Wire SDA(18,17,34, 7) SCL(19,16,33, 8), Wire1: SDA(38), SCL(37), Wire2: SDA(3), SCL(2, 27)
T3.6 Wire SDA(18,17, 34, 7) SCL(19,16, 8), Wire1: SDA(38), SCL(37), Wire2: SDA(3), SCL(2, 27), Wire3: SDA(57), SCL(56)
Note: I did not verify all of them, there are additional ones on 3.5/6...
It is easiest to look at the cards, or source code.. Example for T3.x and TLC look at WireKinetis.cpp
Code:
constexpr TwoWire::I2C_Hardware_t TwoWire::i2c0_hardware = {
SIM_SCGC4, SIM_SCGC4_I2C0,
#if defined(__MKL26Z64__) || defined(__MK20DX128__) || defined(__MK20DX256__)
18, 17, 255, 255, 255,
2, 2, 0, 0, 0,
19, 16, 255, 255, 255,
2, 2, 0, 0, 0,
#elif defined(__MK64FX512__) || defined(__MK66FX1M0__)
18, 17, 34, 8, 48,
2, 2, 5, 7, 2,
19, 16, 33, 7, 47,
2, 2, 5, 7, 2,
#endif
IRQ_I2C0
};
And for example: For T3.5/6 you see, for SDA: 18, 17, 34, 8, 48 and for SCL you see 19, 16 (255 signifies that there are no more pins... )