Skip to content

Deprecate temperature #30

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 15, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion adafruit_ccs811.py
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,11 @@ def eco2(self): # pylint: disable=invalid-name

@property
def temperature(self):
"""Temperature based on optional thermistor in Celsius."""
"""
.. deprecated:: 1.1.5
Hardware support removed by vendor

Temperature based on optional thermistor in Celsius."""
buf = bytearray(5)
buf[0] = _NTC
with self.i2c_device as i2c:
Expand Down
8 changes: 3 additions & 5 deletions examples/ccs811_simpletest.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,11 @@
i2c = busio.I2C(board.SCL, board.SDA)
ccs811 = adafruit_ccs811.CCS811(i2c)

# Wait for the sensor to be ready and calibrate the thermistor
# Wait for the sensor to be ready
while not ccs811.data_ready:
pass
temp = ccs811.temperature
ccs811.temp_offset = temp - 25.0

while True:
print("CO2: {} PPM, TVOC: {} PPM, Temp: {} C"
.format(ccs811.eco2, ccs811.tvoc, ccs811.temperature))
print("CO2: {} PPM, TVOC: {} PPM"
.format(ccs811.eco2, ccs811.tvoc)
time.sleep(0.5)