# Nicla Sense ME getting air quality values

**URL:** <https://forum.arduino.cc/t/nicla-sense-me-getting-air-quality-values/929865>\
**Category:** Nicla Sense ME\
**Created:** [November 28, 2021, 3:41am UTC](https://forum.arduino.cc/t/nicla-sense-me-getting-air-quality-values/929865 "2021-11-28T03:41:09Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![jlutzwpi](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/jlutzwpi/32/705251_2.png) [@jlutzwpi](https://forum.arduino.cc/u/jlutzwpi)\
**Post date:** [November 28, 2021, 3:41am UTC](https://forum.arduino.cc/t/nicla-sense-me-getting-air-quality-values/929865/1 "2021-11-28T03:41:10Z")

</div>

hello, i've been looking at the examples for the Nicla Sense ME. For the 'gas' sensor (the BME688), I'm trying to get what the air quality index is, and also the eCO2. However, the examples only show a "gas.value()" that returns an integer. I have no idea what that is returning (there is no description of units).

I saw on a Bosch message board that a different sensor ID needs to be called out (SensorBSEC bsec(SENSOR\_ID\_BSEC\_LEGACY)) and the SENSOR\_DATA\_FIXED\_LENGTH needs to be updated to 30 in the SensorTypes.h file in the library. However, most of the values are still 0 (I'm only getting the temp, what looks like in degrees C):

BSEC output values - iaq: 0 iaq\_s: 0 b\_voc\_eq: 0.00 co2\_eq: 0 accuracy: 0 comp\_t: 30.93 comp\_h: 20.99

Can anyone assist in how to get the IAQ and eCO2 values from the sensor? Thanks!

---

<div class="post-metadata">

**Author:** ![Koepel](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/koepel/32/637546_2.png) [@Koepel](https://forum.arduino.cc/u/Koepel)\
**Post date:** [November 28, 2021, 4:14am UTC](https://forum.arduino.cc/t/nicla-sense-me-getting-air-quality-values/929865/2 "2021-11-28T04:14:51Z")

</div>

Nicla Sense ME in the store: [https://store.arduino.cc/products/nicla-sense-me](https://store.arduino.cc/products/nicla-sense-me)  
Nicla Sense ME in the docs: [https://docs.arduino.cc/hardware/nicla-sense-me](https://docs.arduino.cc/hardware/nicla-sense-me)  
Nicla Sense ME library: [https://github.com/arduino/nicla-sense-me-fw](https://github.com/arduino/nicla-sense-me-fw)

I'm very sorry, I spent about 20 minutes reading code on Github and didn't get anywhere.  
Adafruit sells the BME688: [https://www.adafruit.com/product/5046](https://www.adafruit.com/product/5046)  
They use the library of the BME680, which returns only the raw value of the gas sensor.  
In the tutorial they tell about the BSEC library and they show an example how to use that. If you try that, you should get better numbers.

---

<div class="post-metadata">

**Author:** ![hditter](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/hditter/32/1099085_2.png) [@hditter](https://forum.arduino.cc/u/hditter)\
**Post date:** [December 17, 2021, 3:59pm UTC](https://forum.arduino.cc/t/nicla-sense-me-getting-air-quality-values/929865/3 "2021-12-17T15:59:55Z")

</div>

It works if you use the updated version of BHY2Host from Github and if you change the SENSOR\_DATA\_FIXED\_LENGTH to 30. There is as well a new example for the BSEC host sketch.  
I used the deprecated ID 171 and not the actual one 115. For whatever reason the actual ID only delivers zero values.

---

<div class="post-metadata">

**Author:** ![jlutzwpi](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/jlutzwpi/32/705251_2.png) [@jlutzwpi](https://forum.arduino.cc/u/jlutzwpi)\
**Post date:** [January 7, 2022, 2:38am UTC](https://forum.arduino.cc/t/nicla-sense-me-getting-air-quality-values/929865/4 "2022-01-07T02:38:52Z")

</div>

@hditter, yes thank you. I meant to come back on the board and post exactly what you wrote. With the new library, and changing the size to 30, along with using the LEGACY ID, I was able to get it to work. Seems awful kludgy to me for a "Pro" board. Thanks for the response.

---

<div class="post-metadata">

**Author:** ![system](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/system/32/1140315_2.png) [@system](https://forum.arduino.cc/u/system)\
**Post date:** [July 6, 2022, 2:39am UTC](https://forum.arduino.cc/t/nicla-sense-me-getting-air-quality-values/929865/5 "2022-07-06T02:39:41Z")

</div>

Closed on July 6, 2022, 2:39am UTC

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