{"id":13612969,"url":"https://github.com/catdog2/mpy_bme280_esp8266","last_synced_at":"2025-04-13T15:32:17.234Z","repository":{"id":150734633,"uuid":"59327948","full_name":"catdog2/mpy_bme280_esp8266","owner":"catdog2","description":"Driver for the Bosch BME280 for use with MicroPython on ESP8266 boards","archived":false,"fork":false,"pushed_at":"2021-05-22T10:50:53.000Z","size":19,"stargazers_count":70,"open_issues_count":5,"forks_count":40,"subscribers_count":10,"default_branch":"master","last_synced_at":"2024-04-22T12:36:00.687Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/catdog2.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,"governance":null,"roadmap":null,"authors":null}},"created_at":"2016-05-20T21:39:11.000Z","updated_at":"2023-05-26T03:09:14.000Z","dependencies_parsed_at":null,"dependency_job_id":"784adcd1-b6fe-40dd-9269-513d7c3e123c","html_url":"https://github.com/catdog2/mpy_bme280_esp8266","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/catdog2%2Fmpy_bme280_esp8266","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/catdog2%2Fmpy_bme280_esp8266/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/catdog2%2Fmpy_bme280_esp8266/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/catdog2%2Fmpy_bme280_esp8266/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/catdog2","download_url":"https://codeload.github.com/catdog2/mpy_bme280_esp8266/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248735853,"owners_count":21153484,"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-01T20:00:37.398Z","updated_at":"2025-04-13T15:32:16.996Z","avatar_url":"https://github.com/catdog2.png","language":"Python","funding_links":[],"categories":["Libraries","精选驱动库"],"sub_categories":["Sensors","传感器"],"readme":"# README #\n\nThis is a driver for the Bosch BME280 temperature/pressure/humidity sensor, for use with MicroPython on ESP8266 boards. It is also compatible with the BMP280 which provides the same interface but temperature + pressure only.\n\n### About the BME280 ###\n\nThe Bosch BME280 Environmental Sensor is a combined temperature, pressure and humidity sensor. It can communicate via I2C or SPI; this driver uses I2C.\n\nSee the datasheet at https://www.adafruit.com/datasheets/BST-BME280_DS001-10.pdf for details.\n\n### Using the library ###\n\nCopy `bme280.py` onto the board (e.g. using webrepl_cli.py). Then:\n\n``` python\nimport machine\nimport bme280\n\ni2c = machine.I2C(scl=machine.Pin(5), sda=machine.Pin(4))\nbme = bme280.BME280(i2c=i2c)\n\nprint(bme.values)\n```\n\n#### Detailed usage ####\n\nThe `values` property is a convenience function that provides a tuple of human-readable string values to quickly check that the sensor is working. In practice, the method to use is `read_compensated_data()` which returns a `(temperature, pressure, humidity)`-tuple:\n\n* `temperature`:  the temperature in hundredths of a degree celsius. For example, the value 2534  indicates a temperature of 25.34 degrees.\n* `pressure`: the atmospheric pressure. This 32-bit value consists of 24 bits indicating the integer value, and 8 bits indicating the fractional value. To get a value in Pascals, divide the return value by 256. For example, a value of 24674867 indicates 96386.2Pa, or 963.862hPa.\n* `humidity`: the relative humidity. This 32-bit value consists of 22 bits indicating the integer value, and 10 bits indicating the fractional value. To get a value in %RH, divide the return value by 1024. For example, a value of 47445 indicates 46.333%RH.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcatdog2%2Fmpy_bme280_esp8266","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcatdog2%2Fmpy_bme280_esp8266","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcatdog2%2Fmpy_bme280_esp8266/lists"}