Need help interpreting the values of gas resistor and volatile organic compounds read from the Arduino_MKRIoTCarrier library

I acquired the Arduino Explore IoT Kit Rev2 which includes the Arduino MKR WiFi 1010 and Arduino MKR IoT Carrier Rev2. The sensor mounted on the Arduino MKR IoT Carrier Rev2 (by default) is the Bosch BME688.

I'm using the following code to output air quality metrics:

#include <Arduino_MKRIoTCarrier.h>

MKRIoTCarrier carrier;

void setup() {
  if (!carrier.begin()) {
    Serial.begin(9600);
    Serial.println("Error initializing MKR IoT Carrier");
    while (1);
  }
  carrier.display.setTextSize(1);
  carrier.display.setTextColor(ST77XX_WHITE);
}

void loop() {
  float temperature = carrier.Env.readTemperature();
  float humidity = carrier.Env.readHumidity();
  float pressure = carrier.Pressure.readPressure();
  float gasResistor = carrier.AirQuality.readGasResistor();
  float volatileOrganicCompounds = carrier.AirQuality.readVOC();
  float co2 = carrier.AirQuality.readCO2();

  Serial.print("Temperature: "); Serial.println(temperature);
  Serial.print("Humidity: "); Serial.println(humidity);
  Serial.print("Pressure: "); Serial.println(pressure);
  Serial.print("Gas Resistor: "); Serial.println(gasResistor);
  Serial.print("VOCs: "); Serial.println(volatileOrganicCompounds);
  Serial.print("CO2: "); Serial.println(co2);

  delay(1000);
}

gasResistor, volatileOrganicCompounds, and co2 return values of 12976914.00, 0.50, and 500.00 respectively. Aside from the fact that the returned values are always the same (which seems strange to me), I'm struggling to find a way to interpret the values 12976914.00 and 0.50 to determine any air quality.

I tried using the bsce.h library, but from what I understand, it is used when the sensor is not connected by default to the Arduino MKR IoT Carrier Rev2 and I don't find any documentation related to these raw data and how to read them.

Am I missing something here, as I'm a beginner in this subject?

Welcome to the forum, and thanks for posting the code properly!

That means the sensor is not working at all, or is not being read out properly. You'll need to find a tutorial on how to set it up. The data sheet for the Bosch gas sensor is quite detailed.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.