Rob Gorbet
New member
Hey folks,
I'm trying to use Adafruit's AMG8833 GridEye with Teensy 3.2, and need to use SCL1/SDA1 (29/30). Because I want to use the Adafruit GridEye libraries, I want to make as few changes to other libraries and code as possible. So while I'm aware of i2c_t3, I'd rather stick with Wire if possible.
The web page https://www.pjrc.com/teensy/td_libs_Wire.html suggests that pins other than the default can be used, by calling Wire.setSCL() and Wire.setSDA(). The versions of wire.cpp and wire.h on my laptop don't appear to have those functions, so I was just going to download the latest from https://github.com/PaulStoffregen/Wire, but I see that the functions in question are actually empty there:
void TwoWire::setSDA(uint8_t pin)
{
}
void TwoWire::setSCL(uint8_t pin)
{
}
Have I missed something?
ALTERNATIVELY
I have also tried using i2c_t3.h instead of Wire.h. I commented out include wire.h and added include i2c_t3.h. Then I recompiled and confirmed that the code runs on SCL0/SDA0. Then I found the spot in Adafruit_AMG88xx.cpp where the I2C port is created, and replaced Wire.begin() with Wire.begin(I2C_MASTER,0x00,29,30)
The code compiles, and then correctly executes the Wire.begin and a few Wire.write calls, but hangs on the first call to Wire.endTransmission(), which never returns.
Thanks for any help folks can provide!
I'm trying to use Adafruit's AMG8833 GridEye with Teensy 3.2, and need to use SCL1/SDA1 (29/30). Because I want to use the Adafruit GridEye libraries, I want to make as few changes to other libraries and code as possible. So while I'm aware of i2c_t3, I'd rather stick with Wire if possible.
The web page https://www.pjrc.com/teensy/td_libs_Wire.html suggests that pins other than the default can be used, by calling Wire.setSCL() and Wire.setSDA(). The versions of wire.cpp and wire.h on my laptop don't appear to have those functions, so I was just going to download the latest from https://github.com/PaulStoffregen/Wire, but I see that the functions in question are actually empty there:
void TwoWire::setSDA(uint8_t pin)
{
}
void TwoWire::setSCL(uint8_t pin)
{
}
Have I missed something?
ALTERNATIVELY
I have also tried using i2c_t3.h instead of Wire.h. I commented out include wire.h and added include i2c_t3.h. Then I recompiled and confirmed that the code runs on SCL0/SDA0. Then I found the spot in Adafruit_AMG88xx.cpp where the I2C port is created, and replaced Wire.begin() with Wire.begin(I2C_MASTER,0x00,29,30)
The code compiles, and then correctly executes the Wire.begin and a few Wire.write calls, but hangs on the first call to Wire.endTransmission(), which never returns.
Thanks for any help folks can provide!