Is it possible to use the secondary I2C bus (pins 29/30 on the bottom side of Teensy 3.2) at the same time as using the audio library to control an attached audio adaptor?
I'd like to have the Teensy control its attached audio adapter, as usual, and at the same time have the Teensy listen as a slave on the secondary I2C bus.
I've tried to take a simple audio sketch that works, and add the i2c_t3 library, and then try to set up slave operation on the secondary bus, as shown in the i2c_t3 library examples (e.g., "Wire1.begin....")
However, compiling yields an error that suggests there's a conflict between the i2c_t3 library and the audio library's use of the Wire library:
.../Contents/Java/hardware/teensy/avr/libraries/i2c_t3/i2c_t3.h:803:15: error: conflicting declaration 'i2c_t3 Wire'
extern i2c_t3 Wire;
.../Contents/Java/hardware/teensy/avr/libraries/Wire/Wire.h:104:16: error: 'Wire' has a previous declaration as 'TwoWire Wire'
extern TwoWire Wire;
^
Error compiling for board Teensy 3.2 / 3.1.
Is there a way to use i2c_t3 library while also using the audio library and audio adaptor?
Or, is there a way to achieve the goal without using i2c_t3? I.e., using the secondary I2C bus (pins 29/30) at the same time the primary I2C bus is being used by the audio library to control the audio adaptor?
Or, is there a way to use the primary I2C bus (pins 18/19) to connect to an external master (and have the Teensy be a slave on it), all while the Teensy is talking to the audio adaptor on that same I2C bus (as a master) to the audio adaptor?
Any help greatly appreciated!
I'd like to have the Teensy control its attached audio adapter, as usual, and at the same time have the Teensy listen as a slave on the secondary I2C bus.
I've tried to take a simple audio sketch that works, and add the i2c_t3 library, and then try to set up slave operation on the secondary bus, as shown in the i2c_t3 library examples (e.g., "Wire1.begin....")
However, compiling yields an error that suggests there's a conflict between the i2c_t3 library and the audio library's use of the Wire library:
.../Contents/Java/hardware/teensy/avr/libraries/i2c_t3/i2c_t3.h:803:15: error: conflicting declaration 'i2c_t3 Wire'
extern i2c_t3 Wire;
.../Contents/Java/hardware/teensy/avr/libraries/Wire/Wire.h:104:16: error: 'Wire' has a previous declaration as 'TwoWire Wire'
extern TwoWire Wire;
^
Error compiling for board Teensy 3.2 / 3.1.
Is there a way to use i2c_t3 library while also using the audio library and audio adaptor?
Or, is there a way to achieve the goal without using i2c_t3? I.e., using the secondary I2C bus (pins 29/30) at the same time the primary I2C bus is being used by the audio library to control the audio adaptor?
Or, is there a way to use the primary I2C bus (pins 18/19) to connect to an external master (and have the Teensy be a slave on it), all while the Teensy is talking to the audio adaptor on that same I2C bus (as a master) to the audio adaptor?
Any help greatly appreciated!