{"id":13802419,"url":"https://github.com/dafvid/micropython-bmp280","last_synced_at":"2025-10-26T04:32:50.843Z","repository":{"id":32197804,"uuid":"131870023","full_name":"dafvid/micropython-bmp280","owner":"dafvid","description":"module for the BMP280 sensor","archived":false,"fork":false,"pushed_at":"2023-11-18T16:21:09.000Z","size":39,"stargazers_count":100,"open_issues_count":3,"forks_count":26,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-04-01T21:04:13.736Z","etag":null,"topics":["bmp280","esp8266","micropython"],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dafvid.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-05-02T15:24:24.000Z","updated_at":"2025-03-26T06:43:51.000Z","dependencies_parsed_at":"2024-11-18T17:44:27.963Z","dependency_job_id":"e1b26dad-b141-4413-b22d-096ba23b3444","html_url":"https://github.com/dafvid/micropython-bmp280","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/dafvid/micropython-bmp280","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dafvid%2Fmicropython-bmp280","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dafvid%2Fmicropython-bmp280/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dafvid%2Fmicropython-bmp280/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dafvid%2Fmicropython-bmp280/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dafvid","download_url":"https://codeload.github.com/dafvid/micropython-bmp280/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dafvid%2Fmicropython-bmp280/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":281059645,"owners_count":26437056,"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","status":"online","status_checked_at":"2025-10-26T02:00:06.575Z","response_time":61,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["bmp280","esp8266","micropython"],"created_at":"2024-08-04T00:01:44.123Z","updated_at":"2025-10-26T04:32:50.581Z","avatar_url":"https://github.com/dafvid.png","language":"Python","readme":"# micropython-bmp280\n\n - https://www.adafruit.com/product/2651\n - https://www.bosch-sensortec.com/products/environmental-sensors/pressure-sensors/pressure-sensors-bmp280-1.html\n - https://www.bosch-sensortec.com/media/boschsensortec/downloads/datasheets/bst-bmp280-ds001.pdf\n\nInspired by  \nhttps://github.com/vitally/BMP280  \nhttps://github.com/micropython-IMU/micropython-bmp180\n\n## Constructor\n**BMP280(i2c_bus, addr=0x76, use_case=BMP280_CASE_HANDHELD_DYN)**\n* *i2c_bus* - the I2C bus to use\n* *addr* - I2C address of the BMP280 (always the same)\n* *use_case* - Use case to start the BMP280 with. Set to None to disable measuring on boot.\n\n## Enums\nValues for different settings are defined in the following constants. Reference to manual section in parenthesis.\n### Use cases (See 3.4, 3.8.2)\n* BMP280_CASE_HANDHELD_LOW\n* BMP280_CASE_HANDHELD_DYN (*default*)\n* BMP280_CASE_WEATHER\n* BMP280_CASE_FLOOR\n* BMP280_CASE_DROP\n* BMP280_CASE_INDOOR\n### Oversampling setting (See 3.3.1, 3.8.2)\n* BMP280_OS_ULTRALOW\n* BMP280_OS_LOW\n* BMP280_OS_STANDARD\n* BMP280_OS_HIGH\n* BMP280_OS_ULTRAHIGH\n### Pressure oversampling (See 3.3.1)\n* BMP280_PRES_OS_SKIP\n* BMP280_PRES_OS_1\n* BMP280_PRES_OS_2\n* BMP280_PRES_OS_4\n* BMP280_PRES_OS_8\n* BMP280_PRES_OS_16\n### Temperature oversampling (See 3.3.2)\n* BMP280_TEMP_OS_SKIP\n* BMP280_TEMP_OS_1\n* BMP280_TEMP_OS_2\n* BMP280_TEMP_OS_4\n* BMP280_TEMP_OS_8\n* BMP280_TEMP_OS_16\n### IIR filter (See 3.3.3)\n* BMP280_IIR_FILTER_OFF\n* BMP280_IIR_FILTER_2\n* BMP280_IIR_FILTER_4\n* BMP280_IIR_FILTER_8\n* BMP280_IIR_FILTER_16\n### Standby settings for Normal measure (See 3.6.3)\n* BMP280_STANDBY_0_5\n* BMP280_STANDBY_62_5\n* BMP280_STANDBY_125\n* BMP280_STANDBY_250\n* BMP280_STANDBY_500\n* BMP280_STANDBY_1000\n* BMP280_STANDBY_2000\n* BMP280_STANDBY_4000\n### Power modes\n* BMP280_POWER_SLEEP\n* BMP280_POWER_FORCED\n* BMP280_POWER_NORMAL\n### SPI 3-wire select\n* BMP280_SPI3W_ON\n* BMP280_SPI3W_OFF\n\n## Example\n```python\nfrom machine import I2C\nfrom bmp280 import *\n\nbus = I2C()\nbmp = BMP280(bus)\n\nbmp.use_case(BMP280_CASE_WEATHER)\nbmp.oversample(BMP280_OS_HIGH)\n\nbmp.temp_os = BMP280_TEMP_OS_8\nbmp.press_os = BMP280_PRES_OS_4\n\nbmp.standby = BMP280_STANDBY_250\nbmp.iir = BMP280_IIR_FILTER_2\n\nbmp.spi3w = BMP280_SPI3W_ON\n\nbmp.power_mode = BMP280_POWER_FORCED\n# or \nbmp.force_measure()\n\nbmp.power_mode = BMP280_POWER_NORMAL\n# or \nbmp.normal_measure()\n# also\nbmp.in_normal_mode()\n\nbmp.power_mode = BMP280_POWER_SLEEP\n# or \nbmp.sleep()\n\nprint(bmp.temperature)\nprint(bmp.pressure)\n\n#True while measuring\nbmp.is_measuring\n\n#True while copying data to registers\nbmp.is_updating\n\n```\n\n## TODO\n* SPI support\n* ~~Filters~~\n* ~~Oversampling settings (half done)~~\n* ~~Power modes~~\n* ~~Standby setting for Normal mode~~\n","funding_links":[],"categories":["Libraries"],"sub_categories":["Sensors"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdafvid%2Fmicropython-bmp280","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdafvid%2Fmicropython-bmp280","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdafvid%2Fmicropython-bmp280/lists"}