{"id":15816660,"url":"https://github.com/aler9/sensor-hp203b","last_synced_at":"2025-08-18T05:11:53.323Z","repository":{"id":107546144,"uuid":"209304090","full_name":"aler9/sensor-hp203b","owner":"aler9","description":"C library for interacting with the HP203B barometer sensor","archived":false,"fork":false,"pushed_at":"2019-09-28T16:39:36.000Z","size":17,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-10-06T05:06:23.638Z","etag":null,"topics":["barometer","hp203b"],"latest_commit_sha":null,"homepage":null,"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/aler9.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":"2019-09-18T12:34:07.000Z","updated_at":"2024-09-28T03:07:21.000Z","dependencies_parsed_at":"2023-06-08T11:30:20.151Z","dependency_job_id":null,"html_url":"https://github.com/aler9/sensor-hp203b","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/aler9%2Fsensor-hp203b","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aler9%2Fsensor-hp203b/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aler9%2Fsensor-hp203b/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aler9%2Fsensor-hp203b/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/aler9","download_url":"https://codeload.github.com/aler9/sensor-hp203b/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246580461,"owners_count":20800108,"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":["barometer","hp203b"],"created_at":"2024-10-05T05:06:39.543Z","updated_at":"2025-04-01T03:42:53.929Z","avatar_url":"https://github.com/aler9.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# sensor-hp203b\n\nC library for interacting with the HP203B barometer sensor.\n\nFeatures:\n* works with the Raspberry Pi and probably with almost every single-board computer equipped with I2C\n\n\n## Installation\n\nCopy all the files ending with `.c` and `.h` into your project folder.\n\n\n## Usage\n\n```\n#include \u003cstdio.h\u003e\n#include \u003cstdlib.h\u003e\n#include \u003cunistd.h\u003e\n#include \u003cfcntl.h\u003e\n\n#include \"hp203b.h\"\n\nint main() {\n    int i2c_fd = open(\"/dev/i2c-1\", O_RDWR);\n    if(i2c_fd \u003c 0) {\n        return -1;\n    }\n\n    hp203bt* hp203b;\n    error* err = hp203b_init(\u0026hp203b, i2c_fd, DSR_4096);\n    if(err != NULL) {\n        return -1;\n    }\n\n    err = hp203b_do_adc(hp203b, 1);\n    if(err != NULL) {\n        return -1;\n    }\n\n    double p;\n    err = hp203b_get_pressure(hp203b, \u0026p);\n    if(err != NULL) {\n        return -1;\n    }\n\n    double a;\n    err = hp203b_get_altitude(hp203b, \u0026a);\n    if(err != NULL) {\n        return -1;\n    }\n\n    double t;\n    err = hp203b_get_temperature(hp203b, \u0026t);\n    if(err != NULL) {\n        return -1;\n    }\n\n    printf(\"%f %f %f\\n\", p, t, a);\n    return 0;\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faler9%2Fsensor-hp203b","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faler9%2Fsensor-hp203b","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faler9%2Fsensor-hp203b/lists"}