Update BME680 for latest BSEC release
compile-tested with 1.8.4192. Not tested on hardware.
This commit is contained in:
parent
ad353524a2
commit
0fa8f9ab4e
2 changed files with 13 additions and 13 deletions
|
|
@ -4,9 +4,9 @@
|
||||||
// SPDX-License-Identifier: MIT
|
// SPDX-License-Identifier: MIT
|
||||||
|
|
||||||
/***************************************************************************
|
/***************************************************************************
|
||||||
This is a library for the BME680 gas, humidity, temperature & pressure sensor
|
This is a library for the BME68X gas, humidity, temperature & pressure sensor
|
||||||
|
|
||||||
Designed specifically to work with the Adafruit BME680 Breakout
|
Designed specifically to work with the Adafruit BME68X Breakout
|
||||||
----> http://www.adafruit.com/products/3660
|
----> http://www.adafruit.com/products/3660
|
||||||
|
|
||||||
These sensors use I2C or SPI to communicate, 2 or 4 pins are required
|
These sensors use I2C or SPI to communicate, 2 or 4 pins are required
|
||||||
|
|
@ -33,7 +33,7 @@ void setup() {
|
||||||
Serial.begin(9600);
|
Serial.begin(9600);
|
||||||
//while (!Serial);
|
//while (!Serial);
|
||||||
|
|
||||||
Serial.println(F("BME680 test"));
|
Serial.println(F("BME68X test"));
|
||||||
|
|
||||||
// SSD1306_SWITCHCAPVCC = generate display voltage from 3.3V internally
|
// SSD1306_SWITCHCAPVCC = generate display voltage from 3.3V internally
|
||||||
if (!display.begin(SSD1306_SWITCHCAPVCC, 0x3D)) { // Address 0x3D for 128x64
|
if (!display.begin(SSD1306_SWITCHCAPVCC, 0x3D)) { // Address 0x3D for 128x64
|
||||||
|
|
@ -50,7 +50,7 @@ void setup() {
|
||||||
display.setTextColor(SSD1306_WHITE);
|
display.setTextColor(SSD1306_WHITE);
|
||||||
display.setRotation(0);
|
display.setRotation(0);
|
||||||
|
|
||||||
iaqSensor.begin(BME680_I2C_ADDR_SECONDARY, Wire);
|
iaqSensor.begin(BME68X_I2C_ADDR_LOW, Wire);
|
||||||
output = "\nBSEC library version " + String(iaqSensor.version.major) + "." + String(iaqSensor.version.minor) + "." + String(iaqSensor.version.major_bugfix) + "." + String(iaqSensor.version.minor_bugfix);
|
output = "\nBSEC library version " + String(iaqSensor.version.major) + "." + String(iaqSensor.version.minor) + "." + String(iaqSensor.version.major_bugfix) + "." + String(iaqSensor.version.minor_bugfix);
|
||||||
Serial.println(output);
|
Serial.println(output);
|
||||||
checkIaqSensorStatus();
|
checkIaqSensorStatus();
|
||||||
|
|
@ -126,30 +126,30 @@ void loop() {
|
||||||
// Helper function definitions
|
// Helper function definitions
|
||||||
void checkIaqSensorStatus(void)
|
void checkIaqSensorStatus(void)
|
||||||
{
|
{
|
||||||
if (iaqSensor.status != BSEC_OK) {
|
if (iaqSensor.bsecStatus != BSEC_OK) {
|
||||||
if (iaqSensor.status < BSEC_OK) {
|
if (iaqSensor.bsecStatus < BSEC_OK) {
|
||||||
output = "BSEC error code : " + String(iaqSensor.status);
|
output = "BSEC error code : " + String(iaqSensor.bsecStatus);
|
||||||
Serial.println(output);
|
Serial.println(output);
|
||||||
display.setCursor(0,0);
|
display.setCursor(0,0);
|
||||||
display.println(output);
|
display.println(output);
|
||||||
display.display();
|
display.display();
|
||||||
for (;;) delay(10);
|
for (;;) delay(10);
|
||||||
} else {
|
} else {
|
||||||
output = "BSEC warning code : " + String(iaqSensor.status);
|
output = "BSEC warning code : " + String(iaqSensor.bsecStatus);
|
||||||
Serial.println(output);
|
Serial.println(output);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (iaqSensor.bme680Status != BME680_OK) {
|
if (iaqSensor.bme68xStatus != BME68X_OK) {
|
||||||
if (iaqSensor.bme680Status < BME680_OK) {
|
if (iaqSensor.bme68xStatus < BME68X_OK) {
|
||||||
output = "BME680 error code : " + String(iaqSensor.bme680Status);
|
output = "BME68X error code : " + String(iaqSensor.bme68xStatus);
|
||||||
Serial.println(output);
|
Serial.println(output);
|
||||||
display.setCursor(0,0);
|
display.setCursor(0,0);
|
||||||
display.println(output);
|
display.println(output);
|
||||||
display.display();
|
display.display();
|
||||||
for (;;) delay(10);
|
for (;;) delay(10);
|
||||||
} else {
|
} else {
|
||||||
output = "BME680 warning code : " + String(iaqSensor.bme680Status);
|
output = "BME68X warning code : " + String(iaqSensor.bme68xStatus);
|
||||||
Serial.println(output);
|
Serial.println(output);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1 +1 @@
|
||||||
depends=Adafruit ILI9341, Adafruit BusIO, SD, Adafruit NeoPixel, Adafruit VS1053 Library, Adafruit BluefruitLE nRF51, Adafruit seesaw Library, Ethernet, Adafruit IO Arduino, FastLED, Adafruit LiquidCrystal, Adafruit SoftServo, TinyWireM, Adafruit AM radio library, WaveHC, Adafruit LED Backpack Library, MAX31850 OneWire, Adafruit VC0706 Serial Camera Library, RTClib, Adafruit SleepyDog Library, Adafruit Thermal Printer Library, Adafruit Zero I2S Library, Adafruit EPD, Adafruit SSD1351 library, Adafruit FONA Library, Adafruit Motor Shield V2 Library, Adafruit NeoMatrix, Adafruit Soundboard library, Adafruit Circuit Playground, ArduinoJson, Adafruit TCS34725, Adafruit Pixie, Adafruit GPS Library, TinyGPS, WiFi101, Adafruit DotStar, Adafruit Si7021 Library, Adafruit WS2801 Library, Mouse, Keyboard, Time, IRremote, Adafruit LSM9DS0 Library, Adafruit Arcada Library, MIDIUSB, PubSubClient, Adafruit LIS2MDL, Adafruit NeoPXL8, Adafruit MCP23017 Arduino Library, Adafruit MLX90640, LiquidCrystal, Adafruit NeoTrellis M4 Library, RGB matrix Panel, Adafruit MLX90614 Library, Adafruit RGB LCD Shield Library, MAX6675 library, Adafruit MP3, Adafruit Keypad, Adafruit Arcada GifDecoder, Keypad, Neosegment, Encoder, Adafruit TiCoServo, Adafruit Trellis Library, FauxmoESP, Adafruit LSM303 Accel, Adafruit LSM303DLH Mag, Adafruit LSM303DLHC, CapacitiveSensor, Adafruit Zero PDM Library, Adafruit DMA neopixel library, elapsedMillis, DST RTC, Adafruit SHARP Memory Display, Adafruit SPIFlash, BSEC Software Library@1.6.1480, WiiChuck, Adafruit DPS310, Adafruit AHTX0, RotaryEncoder, Adafruit MCP9808 Library, LSM303, Adafruit Protomatter, Adafruit IS31FL3741 Library, Sensirion I2C SCD4x, Adafruit TestBed, Bounce2, Adafruit AHRS, Adafruit DRV2605 Library, STM32duino VL53L4CD, PicoDVI - Adafruit Fork
|
depends=Adafruit ILI9341, Adafruit BusIO, SD, Adafruit NeoPixel, Adafruit VS1053 Library, Adafruit BluefruitLE nRF51, Adafruit seesaw Library, Ethernet, Adafruit IO Arduino, FastLED, Adafruit LiquidCrystal, Adafruit SoftServo, TinyWireM, Adafruit AM radio library, WaveHC, Adafruit LED Backpack Library, MAX31850 OneWire, Adafruit VC0706 Serial Camera Library, RTClib, Adafruit SleepyDog Library, Adafruit Thermal Printer Library, Adafruit Zero I2S Library, Adafruit EPD, Adafruit SSD1351 library, Adafruit FONA Library, Adafruit Motor Shield V2 Library, Adafruit NeoMatrix, Adafruit Soundboard library, Adafruit Circuit Playground, ArduinoJson, Adafruit TCS34725, Adafruit Pixie, Adafruit GPS Library, TinyGPS, WiFi101, Adafruit DotStar, Adafruit Si7021 Library, Adafruit WS2801 Library, Mouse, Keyboard, Time, IRremote, Adafruit LSM9DS0 Library, Adafruit Arcada Library, MIDIUSB, PubSubClient, Adafruit LIS2MDL, Adafruit NeoPXL8, Adafruit MCP23017 Arduino Library, Adafruit MLX90640, LiquidCrystal, Adafruit NeoTrellis M4 Library, RGB matrix Panel, Adafruit MLX90614 Library, Adafruit RGB LCD Shield Library, MAX6675 library, Adafruit MP3, Adafruit Keypad, Adafruit Arcada GifDecoder, Keypad, Neosegment, Encoder, Adafruit TiCoServo, Adafruit Trellis Library, FauxmoESP, Adafruit LSM303 Accel, Adafruit LSM303DLH Mag, Adafruit LSM303DLHC, CapacitiveSensor, Adafruit Zero PDM Library, Adafruit DMA neopixel library, elapsedMillis, DST RTC, Adafruit SHARP Memory Display, Adafruit SPIFlash, BSEC Software Library, WiiChuck, Adafruit DPS310, Adafruit AHTX0, RotaryEncoder, Adafruit MCP9808 Library, LSM303, Adafruit Protomatter, Adafruit IS31FL3741 Library, Sensirion I2C SCD4x, Adafruit TestBed, Bounce2, Adafruit AHRS, Adafruit DRV2605 Library, STM32duino VL53L4CD, PicoDVI - Adafruit Fork
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue