Hi,
Quick question (hopefully) regarding the Wire library, I2C and Wire.begin() using a Teensy 4.1.
I'm want to use pins 24 and 25 (which can also function as SCL2 / SDA2) as specific in and out functions in a new sketch. I'm planning to use them as an input and output. But... I want to add a I2C display to pins 19 / 18 (SCL / SDA).
The question is... If I envoke Wire.begin() will it map ALL the SCL / SDA pins (19/18, 16/17, 24,25) for I2C use (as Wire0, Wire1, Wire2)? I don't want it to map pins 24 and 25.
All the documentation I have been looking through seems to suggest this happens. I only wish to set up pins 19 / 18 for I2C - not the others. Or do I simply envoke Wire.begin() then re-map the specific pins? (But I'm not sure how to do that).
Or, can I not use Wire at all and map pins 19 / 18 specifically like you do with switches and LEDs? There doesn't appear to be a way to do that either as far as I can see. I thought that you have to envoke Wire to make I2C work... Am I completely wrong?
I hope this isn't a stupid question but it's not very clear what happens in this instance. I haven't written the sketch yet and am only in the planning stage but I want to clarify this before proceeding blindly into it.
I'm using a lot of inputs so it's not just a case of moving my in / outs to different pins. I need to use pins 24/25 if I can.
Any information would be useful. Thanks.
Quick question (hopefully) regarding the Wire library, I2C and Wire.begin() using a Teensy 4.1.
I'm want to use pins 24 and 25 (which can also function as SCL2 / SDA2) as specific in and out functions in a new sketch. I'm planning to use them as an input and output. But... I want to add a I2C display to pins 19 / 18 (SCL / SDA).
The question is... If I envoke Wire.begin() will it map ALL the SCL / SDA pins (19/18, 16/17, 24,25) for I2C use (as Wire0, Wire1, Wire2)? I don't want it to map pins 24 and 25.
All the documentation I have been looking through seems to suggest this happens. I only wish to set up pins 19 / 18 for I2C - not the others. Or do I simply envoke Wire.begin() then re-map the specific pins? (But I'm not sure how to do that).
Or, can I not use Wire at all and map pins 19 / 18 specifically like you do with switches and LEDs? There doesn't appear to be a way to do that either as far as I can see. I thought that you have to envoke Wire to make I2C work... Am I completely wrong?
I hope this isn't a stupid question but it's not very clear what happens in this instance. I haven't written the sketch yet and am only in the planning stage but I want to clarify this before proceeding blindly into it.
I'm using a lot of inputs so it's not just a case of moving my in / outs to different pins. I need to use pins 24/25 if I can.
Any information would be useful. Thanks.