

So you can move up two folder levels to get to the root folder of the library. This will open the example sketch folder inside of the Wire library folder. Serial.print(bme.readPressure() / 100. File > Examples > Wire > digitalpotentiometer (or any other example in that menu) Sketch > Show Sketch Folder. Serial.print(" ID of 0圆1 represents a BME 680.\n") Serial.print(" ID of 0圆0 represents a BME 280.\n") Serial.print(" ID of 0x56-0x58 represents a BMP 280,\n")

Serial.print(" ID of 0xFF probably means a bad address, a BMP 180 or BMP 085\n") Serial.print("SensorID was: 0x") Serial.println(bme.sensorID(),16) Serial.println("Could not find a valid BME280 sensor, check wiring, address, sensor ID!") You can also pass in a Wire library object like &Wire2 While(!Serial) // time to get serial running Adafruit_BME280 bme(BME_CS, BME_MOSI, BME_MISO, BME_SCK) // software SPI Adafruit_BME280 bme(BME_CS) // hardware SPI So I wonder if there are still cases or any specific reason to include them twice?Īdditionally, if a library is included/referenced twice like mentioned above, wouldn't it increase the size of the sketch unnecessarily?Įxample Sketch that comes with the library #include So I tried commenting out them in my sketch and it still works. However, I see that in the Adafruit_BME280 library header file, these libraries are already included. If you're using the Arduino Wire library, make sure you include 'Wire.h'in your main sketch file.

I am also in the process of incorporating Francesco Ferrara's FastWire code. In the example sketches, they have included the Wire, SPI and the Adafruit_Sensor library. The default option is to use the Arduino Wire library, but there are other options if Wire is not available. While this library is sufficient most of the time when you want to communicate with devices. I am using the Adafruit BME280 library in my sketch. The standard I2C library for the Arduino is the Wire Library.
