Hi,
I recently received a project that uses teensy 3.2 and I receive the following error when trying to compile using platform.io ide, any help would be appreciated
In file included from C:\Users\rafa\.platformio\packages\framework-arduinoteensy\libraries\Wire/Wire.h:29,
from .pio\libdeps\teensy31\SparkFun BME280\src/SparkFunBME280.h:39,
from src\main.cpp:36:
C:\Users\rafae\.platformio\packages\framework-arduinoteensy\libraries\Wire/WireKinetis.h:229:16: error: conflicting declaration 'TwoWire Wire'
229 | extern TwoWire Wire;
| ^~~~
In file included from src\main.cpp:30:
C:\Users\rafa\.platformio\packages\framework-arduinoteensy\libraries\i2c_t3/i2c_t3.h:1000:15: note: previous declaration as 'i2c_t3 Wire'
1000 | extern i2c_t3 Wire;
| ^~~~
In file included from C:\Users\rafa\.platformio\packages\framework-arduinoteensy\libraries\Wire/Wire.h:29,
from .pio\libdeps\teensy31\SparkFun BME280\src/SparkFunBME280.h:39,
from src\main.cpp:36:
C:\Users\rafa\.platformio\packages\framework-arduinoteensy\libraries\Wire/WireKinetis.h:232:16: error: conflicting declaration 'TwoWire Wire1'
232 | extern TwoWire Wire1;
| ^~~~~
In file included from src\main.cpp:30:
C:\Users\rafa\.platformio\packages\framework-arduinoteensy\libraries\i2c_t3/i2c_t3.h:1002:19: note: previous declaration as 'i2c_t3 Wire1'
1002 | extern i2c_t3 Wire1;
| ^~~~~
In file included from src\main.cpp:36:
.pio\libdeps\teensy31\SparkFun BME280\src/SparkFunBME280.h:194:39: error: could not convert 'Wire' from 'i2c_t3' to 'TwoWire&'
194 | bool beginI2C(TwoWire &wirePort = Wire); //Called when user provides Wire port
| ^~~~
| |
| i2c_t3
src\main.cpp: In function 'void setup()':
src\main.cpp:738:23: error: invalid initialization of reference of type 'TwoWire&' from expression of type 'i2c_t3'
738 | if (!sensor.beginI2C())
| ~~~~~~~~~~~~~~~^~
In file included from src\main.cpp:36:
.pio\libdeps\teensy31\SparkFun BME280\src/SparkFunBME280.h:194:28: note: in passing argument 1 of 'bool BME280::beginI2C(TwoWire&)'
194 | bool beginI2C(TwoWire &wirePort = Wire); //Called when user provides Wire port
| ~~~~~~~~~^~~~~~~~~~~~~~~
*** [.pio\build\teensy31\src\main.cpp.o] Error 1
I recently received a project that uses teensy 3.2 and I receive the following error when trying to compile using platform.io ide, any help would be appreciated
In file included from C:\Users\rafa\.platformio\packages\framework-arduinoteensy\libraries\Wire/Wire.h:29,
from .pio\libdeps\teensy31\SparkFun BME280\src/SparkFunBME280.h:39,
from src\main.cpp:36:
C:\Users\rafae\.platformio\packages\framework-arduinoteensy\libraries\Wire/WireKinetis.h:229:16: error: conflicting declaration 'TwoWire Wire'
229 | extern TwoWire Wire;
| ^~~~
In file included from src\main.cpp:30:
C:\Users\rafa\.platformio\packages\framework-arduinoteensy\libraries\i2c_t3/i2c_t3.h:1000:15: note: previous declaration as 'i2c_t3 Wire'
1000 | extern i2c_t3 Wire;
| ^~~~
In file included from C:\Users\rafa\.platformio\packages\framework-arduinoteensy\libraries\Wire/Wire.h:29,
from .pio\libdeps\teensy31\SparkFun BME280\src/SparkFunBME280.h:39,
from src\main.cpp:36:
C:\Users\rafa\.platformio\packages\framework-arduinoteensy\libraries\Wire/WireKinetis.h:232:16: error: conflicting declaration 'TwoWire Wire1'
232 | extern TwoWire Wire1;
| ^~~~~
In file included from src\main.cpp:30:
C:\Users\rafa\.platformio\packages\framework-arduinoteensy\libraries\i2c_t3/i2c_t3.h:1002:19: note: previous declaration as 'i2c_t3 Wire1'
1002 | extern i2c_t3 Wire1;
| ^~~~~
In file included from src\main.cpp:36:
.pio\libdeps\teensy31\SparkFun BME280\src/SparkFunBME280.h:194:39: error: could not convert 'Wire' from 'i2c_t3' to 'TwoWire&'
194 | bool beginI2C(TwoWire &wirePort = Wire); //Called when user provides Wire port
| ^~~~
| |
| i2c_t3
src\main.cpp: In function 'void setup()':
src\main.cpp:738:23: error: invalid initialization of reference of type 'TwoWire&' from expression of type 'i2c_t3'
738 | if (!sensor.beginI2C())
| ~~~~~~~~~~~~~~~^~
In file included from src\main.cpp:36:
.pio\libdeps\teensy31\SparkFun BME280\src/SparkFunBME280.h:194:28: note: in passing argument 1 of 'bool BME280::beginI2C(TwoWire&)'
194 | bool beginI2C(TwoWire &wirePort = Wire); //Called when user provides Wire port
| ~~~~~~~~~^~~~~~~~~~~~~~~
*** [.pio\build\teensy31\src\main.cpp.o] Error 1