finitespace / BME280

Provides an Arduino library for reading and interpreting Bosch BME280 data over I2C, SPI or Sw SPI.
GNU General Public License v3.0
212 stars 105 forks source link

SPI.h is inculed althought BME280Spi is not in use #128

Open FrederikWolter opened 3 years ago

FrederikWolter commented 3 years ago

Expected behavior

If you are not using the BME280Spi part of the library, I would expect that the SPI.h library is not needed. As is the case with BME280I2C_BRZO with brzo_i2c.h

Actual behavior

Compiling my project in platformio for VSCode throws the following error: grafik I don't really know why the SPI.h could not be found. But the point is it shouldn't be able to be found at all. If I comment out the content of BME280SPI.cpp, my code works fine.

Steps to reporduce the behavior

chikiball commented 2 years ago

Just Include SPI.h and Wire.h (my errors include SPI.h and Wire.h No such file or directory) in your main.cpp and recompile, It worked for me.