Best way to use (Adafruit) MCP9808 with i2c_t3 library (Teensy 3.6)

Status
Not open for further replies.

DougMcK

Well-known member
I'm using the i2c_t3 library (for various reasons) on a fairly large project. I'd like to add a MCP9808 temperature sensor to the first I2C bus, but the Adafruit library uses the Wire library, leading to errors.

I haven't really dug into this yet, but I'm curious if there's a known sensible change that can be made to the Adafruit library to make it happy? I'm guessing I'm not the first to want to tweak a library that's expecting Wire to work with i2c_t3.

Any thoughts appreciated.
Doug
 
I suggest you look here at the bottom of the page.

Thanks for the reply. What exactly are you drawing my attention to? The sensor works find with the T3.6, that's not a problem. What I am pondering is how to, most cleanly, get the Adafruit library to play nice with i2c_t3. At this time, I reckon I'll make a modified version of that library with references to TwoWire replaced with i2c_t3, but that seems a bit clunky.

regards
Doug
 
You could look at this library. I know it's not using i2c_t3 but it might be easier to modify than the AdaFruit library.
 
You could look at this library. I know it's not using i2c_t3 but it might be easier to modify than the AdaFruit library.

Thx, I hadn't come across that library. It would probably have been a good option, but by the time I read this I had already modified the Adafruit library and got it working. It took a bit less time than I feared.
Doug
 
Status
Not open for further replies.
Back
Top