adafruit / Adafruit_CircuitPython_CCS811

circuit python driver for CCS811 air quality sensor
MIT License
34 stars 24 forks source link

Deprecate temperature #30

Closed caternuson closed 5 years ago

caternuson commented 5 years ago

Hardware support for external thermistor removed by vendor. Remove calls to temperature from example and update docstring.

Napsty commented 5 years ago

Hardware support for external thermistor removed by vendor.

@caternuson Do you happen to know the source of this information? Thx

caternuson commented 5 years ago

It's in AMS's rev notes for the CCS811: https://ams.com/documents/20143/36005/CCS811_PN000149_1-00.pdf/ image

Why they did it? I do not know.

Napsty commented 5 years ago

@caternuson thx! However the temperature sensor still "kind of works" and shows correct increase and decrease of surrounding temperatures. Here's an example of my sensor currently being in the garage and overnight the temperature dropped until this morning after 9am when it started to rise again.

image

Maybe they removed it from the datasheet to not confuse customers that this sensor can be used to measure real temperature as the temperature is a few degrees too high (probably due to sensor's own heat)? To me the sensor's temperature is a helpful indicator nevertheless.

If someone (like me) still wants to get the temp readings, we should still document the possibility of ccs811.temperature somewhere. Is there a function reference somewhere? Currently ccs.temperature(after ccs = adafruit_ccs811.CCS811(i2c_bus)) is still documented in the README.

ladyada commented 5 years ago

old chips have the register working, new chips definitely do not - they return 0 data always. i agree the sensor wasn't great, but having the function is just going to be a total nightmare for support. we'd rather just remove it.

caternuson commented 5 years ago

@ladyada I didn't remove the function, just marked it as deprecated. Figured leave it in for boards with the older rev chip. Let me know if you want it totally gone.

I'll make a quick PR for this:

Currently ccs.temperature(after ccs = adafruit_ccs811.CCS811(i2c_bus)) is still documented in the README.

Thanks for spotting that @Napsty

ladyada commented 5 years ago

yes sorry, please do keep it marked deprecated but there. can u remove it from the examples if its there?

caternuson commented 5 years ago

Yep, took care of examples already. Looks like it was just a few lingering mentions. PR'd in #32

Napsty commented 5 years ago

old chips have the register working, new chips definitely do not - they return 0 data always.

Good point. How does the end user know about the chip version? I bought the CCS811 in January this year (2019) and it returns a temperature value.

ladyada commented 5 years ago

check the firmware version

Napsty commented 5 years ago

check the firmware version

Tell me how and I'll do :)

ladyada commented 5 years ago

the registers are described in the datasheet, we dont have code for it specifically