{"id":13612971,"url":"https://github.com/micropython-IMU/micropython-bmp180","last_synced_at":"2025-04-13T15:32:11.754Z","repository":{"id":18316627,"uuid":"21495513","full_name":"micropython-IMU/micropython-bmp180","owner":"micropython-IMU","description":"micropython-bmp180 is a module for micropython which provides a class for the BMP180 pressure sensor","archived":false,"fork":false,"pushed_at":"2021-12-24T18:48:41.000Z","size":173,"stargazers_count":86,"open_issues_count":6,"forks_count":38,"subscribers_count":8,"default_branch":"master","last_synced_at":"2025-04-05T18:05:36.537Z","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":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/micropython-IMU.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-07-04T11:41:03.000Z","updated_at":"2024-12-17T20:38:42.000Z","dependencies_parsed_at":"2022-08-07T09:00:38.215Z","dependency_job_id":null,"html_url":"https://github.com/micropython-IMU/micropython-bmp180","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/micropython-IMU%2Fmicropython-bmp180","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/micropython-IMU%2Fmicropython-bmp180/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/micropython-IMU%2Fmicropython-bmp180/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/micropython-IMU%2Fmicropython-bmp180/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/micropython-IMU","download_url":"https://codeload.github.com/micropython-IMU/micropython-bmp180/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248735835,"owners_count":21153481,"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.427Z","updated_at":"2025-04-13T15:32:11.495Z","avatar_url":"https://github.com/micropython-IMU.png","language":"Python","funding_links":[],"categories":["Libraries","精选驱动库"],"sub_categories":["Sensors","传感器"],"readme":"micropython-bmp180\n==================\n\nModule bmp180\n-----------------\nbmp180 is a micropython module for the Bosch BMP180 sensor. It measures\ntemperature as well as pressure, with a high enough resolution to calculate\naltitude.  \nBreakoutboard: http://www.adafruit.com/products/1603  \ndata-sheet: http://ae-bst.resource.bosch.com/media/products/dokumente/bmp180/BST-BMP180-DS000-09.pdf\n\nIf you have any questions, open an issue.\n\n### Wiring the sensor to the pyboard\n\n| pyboard| bmp180 |\n|:------:|:------:|\n| VIN    | VIN    |\n| 3V3    | 3Vo    |\n| GND    | GND    |\n| SCL    | SCL    |\n| SDA    | SDA    |\n\n### Quickstart\n\nExample:\n```python\nfrom bmp180 import BMP180\nfrom machine import I2C, Pin                        # create an I2C bus object accordingly to the port you are using\nbus = I2C(1, baudrate=100000)           # on pyboard\n# bus =  I2C(scl=Pin(4), sda=Pin(5), freq=100000)   # on esp8266\nbmp180 = BMP180(bus)\nbmp180.oversample_sett = 2\nbmp180.baseline = 101325\n\ntemp = bmp180.temperature\np = bmp180.pressure\naltitude = bmp180.altitude\nprint(temp, p, altitude)\n```\n\nImportant Notice:  \nMake sure to either use this in fast loops or call gauge() in fast loops to make sure to always get current values. If you call pressure() once and then again 10 seconds later, it will report a 10 seconds old value. Look at the gauge() function in the source to understand this. Alternatively use the blocking_read() method.\n\nClasses\n-------\n``BMP180``  \nModule for the BMP180 pressure sensor.  \n![UML diagramm](https://raw.githubusercontent.com/turbinenreiter/micropython-bmp180/master/classes_BMP180.png \"UML diagramm\")\n\n\nMethods\n--------------\n\n``compvaldump()``\nReturns a list of all compensation values.  \n\n``gauge()``  \nGenerator refreshing the measurements. Does not need to be called manually.\n\n``temperature``  \nNonblocking read of temperature in degree C.  \n\n``pressure``  \nNonblocking read of pressure in Pascal (divide result by 100 for millibar/hP).  \n\n``blocking_read()``  \nTrigger a read and wait until data is available.  \n\n``altitude``  \nAltitude in m.  \n\n\nInstance variables\n------------------\n``chip_id``  \nID of chip is hardcoded on the sensor.\n\n``oversample_sett``  \nSets the accuracy. Default: 0  \n* 0 lowest accuracy, fastest\n* 1\n* 2\n* 3 highest accuracy, slowest\n\n``baseline``  \nPressure at Main Sea Level. The default is 101325 Pa, but you can use your local QNH in Pa.  \nTo get different altitudes, use this as baselines:\n\n| altitude |       baseline |  \n|:--------:|:--------------:|  \n| absolute | local pressure |  \n| true     |        QNH*100 |  \n| pressure | 101325 or None |  \n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmicropython-IMU%2Fmicropython-bmp180","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmicropython-IMU%2Fmicropython-bmp180","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmicropython-IMU%2Fmicropython-bmp180/lists"}