{"id":13802483,"url":"https://github.com/Notthemarsian/CCS811","last_synced_at":"2025-05-13T13:31:28.110Z","repository":{"id":56525848,"uuid":"118963440","full_name":"Notthemarsian/CCS811","owner":"Notthemarsian","description":"Basic MicroPython driver for CCS811 on ESP8266 boards","archived":false,"fork":false,"pushed_at":"2020-11-02T14:23:48.000Z","size":20,"stargazers_count":30,"open_issues_count":3,"forks_count":6,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-08-04T00:07:16.490Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Notthemarsian.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-01-25T20:21:44.000Z","updated_at":"2024-07-29T20:49:53.000Z","dependencies_parsed_at":"2022-08-15T20:20:41.353Z","dependency_job_id":null,"html_url":"https://github.com/Notthemarsian/CCS811","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Notthemarsian%2FCCS811","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Notthemarsian%2FCCS811/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Notthemarsian%2FCCS811/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Notthemarsian%2FCCS811/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Notthemarsian","download_url":"https://codeload.github.com/Notthemarsian/CCS811/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":225218078,"owners_count":17439713,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-04T00:01:45.475Z","updated_at":"2024-11-18T17:31:29.511Z","avatar_url":"https://github.com/Notthemarsian.png","language":"Python","funding_links":[],"categories":["Libraries"],"sub_categories":["Sensors"],"readme":"# CCS811\nBasic MicroPython driver for ams CCS811 sensor connected over I2C.\n\nThe ams CCS811 is a digital metal oxide gas sensor which detects a wide range of volatile organic compounds.\nThe sensor outputs a Total VOC value in ppb and an equivalent CO2 level in ppm.\n\nDriver based on datasheet.\nTested with Adafruit CCS811 Air Quality Sensor Breakout (i2c addr = 90 / 0x5A; alternative addr = 91 / 0x5B). Remember to connect WAKE pin to ground.\nTested with both NodeMCU and Wemos D1 mini with MicroPython version v1.9.3-8-g63826ac5c ESP8266.\n(Sparkfun CCS811 Air Quality Breakout has default address 91 (0x5B)).\n\nDefine sensor c:   c = CCS811.CCS811(i2c=i2c,addr=90)\n\nThe driver starts the sensor in operation mode 1: constant power mode, new measurement every second.\nMode 0,2,3,4 are not implemented.\nThe sensor has to run for 20 minutes before accurate readings are generated (the resistance has to stabilise). ams advises to run the sensor for 48 hours when new (see burn-in period in datasheet).\n\nCall c.data_ready() to get new measurements.\nSee example.py for usage.\n\nThe sensor readings seem to drift a lot with temperature and humidity changes. Compensation data can be written to the sensor with the function c.put_envdata(humidity=h,temp=t) and this improves stability. \nSee exampleTcorrection.py for usage. The example uses a Bosch BME280 sensor to measure temperature and humidity (BME280 driver from catdog2) and writes this data to the ENV_DATA register.\n\nManual Baseline Correction:\nThe resistance varies from sensor to sensor and over time. A baseline is maintained by the software (internal Automatic Baseline Correction). It is possible to retrieve and later restore this baseline (e.g. save a baseline when operating in clean air).\nThe baseline can be retrieved from the BASELINE register. It is a two-byte read/write register which contains an encoded version of the current baseline used in Algorithm Calculations. These two bytes can be read with x,y = c.get_baseline(). This baseline can be saved and written back to the register with c.put_baseline(HB=x,LB=y). The Algorithms will use the new value in its calculations (until it adjusts it as part of its internal Automatic Baseline Correction). The baseline should only be retrieved or restored when the resistance is stable (typically earliest after 20-30 minutes operation - see datasheet).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FNotthemarsian%2FCCS811","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FNotthemarsian%2FCCS811","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FNotthemarsian%2FCCS811/lists"}