{"id":23060332,"url":"https://github.com/quard/bmx280","last_synced_at":"2025-04-03T07:15:45.889Z","repository":{"id":139469755,"uuid":"296516156","full_name":"Quard/BMx280","owner":"Quard","description":"Bosch BME280/BMP280 pressure sensor light library","archived":false,"fork":false,"pushed_at":"2020-09-18T04:48:55.000Z","size":6,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-08T20:47:42.582Z","etag":null,"topics":["bme280","bmp280","bosch-sensor","mcu","sensor","stm32"],"latest_commit_sha":null,"homepage":"","language":"C","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/Quard.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":"2020-09-18T04:47:19.000Z","updated_at":"2023-03-25T16:30:47.000Z","dependencies_parsed_at":null,"dependency_job_id":"e0829191-8d4f-4770-823c-e25c7188ad35","html_url":"https://github.com/Quard/BMx280","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/Quard%2FBMx280","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Quard%2FBMx280/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Quard%2FBMx280/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Quard%2FBMx280/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Quard","download_url":"https://codeload.github.com/Quard/BMx280/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246952274,"owners_count":20859812,"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":["bme280","bmp280","bosch-sensor","mcu","sensor","stm32"],"created_at":"2024-12-16T03:11:56.943Z","updated_at":"2025-04-03T07:15:45.870Z","avatar_url":"https://github.com/Quard.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# BMx280\n\nBosch BME280/BMP280 pressure sensor light library. In original adopted for SMT32 Low Layer library but could be easily changed to any other platform.\n\n[BME280 datasheet](https://www.bosch-sensortec.com/media/boschsensortec/downloads/datasheets/bst-bme280-ds002.pdf)\n\n[BMP280 datasheet](https://www.bosch-sensortec.com/media/boschsensortec/downloads/datasheets/bst-bmp280-ds001.pdf)\n\n## How to use\n\n```C\nBMx280_HandleTypeDef bme280;\n\nbme280.hi2c = I2C1;\nbme280.address = 0x76;\n\nBMx280_Config config = {\n    .filter = BMx280_FILTER_4,\n    .t_sb = BMx280_TIMESTBY_1000\n};\n\nBMx280_Oversampling oversampling = {\n    .osrs_t = BMx280_OVERSAMPLING_4,\n    .osrs_p = BMx280_OVERSAMPLING_2,\n    .osrs_h = BMx280_OVERSAMPLING_1,\n};\n\nBMx280_Init(\u0026bme280);\nBMx280_SetConfig(\u0026bme280, config);\nBMx280_SetOversampling(\u0026bme280, oversampling);\nBMx280_SetMode(\u0026bme280, BMx280_MODE_NORMAL);\n\nBMx280_ReadMeasurements(\u0026bme280);\n\nfloat temperature = BMx280_GetTemperature(\u0026bme280);\nfloat pressure = BMx280_GetPressure(\u0026bme280);\nfloat humidity = BMx280_GetHumidity(\u0026bme280);\n```\n\n## Porting routine\n\n1. Change includes in `bmx280.h` to proper for your MCU, also maybe you want to replace I2C with SPI\n2. Change `_BMx280_IO_Write8` and `_BMx280_IO_Read` functions in `bmx280.c` to implement read and write functionality according your MCU\n\n## Tested using\n\nsensors:\n* GY-BME280 (BME280 sensor)\n* GY-91 (BMP280 sensor)\n\non boards:\n* STM32 Nucleo-L073RZ\n* STM32 L010F4","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fquard%2Fbmx280","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fquard%2Fbmx280","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fquard%2Fbmx280/lists"}