Hi everyone,
I'm new to Teensy and Arduino and so far I'm really impressed.
I'm an electronics engineer and used to writing assembly and C, but I've ot myself a teensy 3.6 to have a play with without all the faff of writing low level drivers.
Anyway, I've managed to get myself a Teensy 3.6 hooked up to 8 of the Adafruit Trellis PCBs via a level shifter and it's working great.
What I want to do now is use the other I2C busses (well at least one, if not two), I want to use one of them for the 3 axis accelerometer.
I've read up and know that I should be using the "i2c_t3" library in place of the "wire" library, but when I swap "#include <wire.h>" for "#include <i2c_t3.h>" I get the following errors ;
Digging a little deeper it seems the trellis libraries have the 'wire.h' library hardwired in.
Is there a way around this?
Many thanks in advance
Paula
I'm new to Teensy and Arduino and so far I'm really impressed.
I'm an electronics engineer and used to writing assembly and C, but I've ot myself a teensy 3.6 to have a play with without all the faff of writing low level drivers.
Anyway, I've managed to get myself a Teensy 3.6 hooked up to 8 of the Adafruit Trellis PCBs via a level shifter and it's working great.
What I want to do now is use the other I2C busses (well at least one, if not two), I want to use one of them for the 3 axis accelerometer.
I've read up and know that I should be using the "i2c_t3" library in place of the "wire" library, but when I swap "#include <wire.h>" for "#include <i2c_t3.h>" I get the following errors ;
Arduino: 1.8.1 (Mac OS X), TD: 1.35, Board: "Teensy 3.6, Serial, 180 MHz, Fast, US English"
In file included from /Users/Paula/Documents/Arduino/libraries/Adafruit_Trellis_Library-master/Adafruit_Trellis.h:35:0,
from /Users/Paula/Dropbox/Projects/Nexus/TrellisTest/TrellisTest.ino:20:
/Applications/Arduino.app/Contents/Java/hardware/teensy/avr/libraries/Wire/Wire.h:104:16: error: conflicting declaration 'TwoWire Wire'
extern TwoWire Wire;
^
In file included from /Users/Paula/Dropbox/Projects/Nexus/TrellisTest/TrellisTest.ino:19:0:
/Applications/Arduino.app/Contents/Java/hardware/teensy/avr/libraries/i2c_t3/i2c_t3.h:987:15: error: 'Wire' has a previous declaration as 'i2c_t3 Wire'
extern i2c_t3 Wire;
^
Error compiling for board Teensy 3.6.
This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.
Digging a little deeper it seems the trellis libraries have the 'wire.h' library hardwired in.
Is there a way around this?
Many thanks in advance
Paula