{"id":24121858,"url":"https://github.com/tomasz-lewicki/pms7003","last_synced_at":"2025-08-09T08:30:03.834Z","repository":{"id":36201248,"uuid":"152110202","full_name":"tomasz-lewicki/pms7003","owner":"tomasz-lewicki","description":"A minimal python interface for PMS7003 PM sensor","archived":false,"fork":false,"pushed_at":"2021-11-04T09:04:00.000Z","size":643,"stargazers_count":21,"open_issues_count":0,"forks_count":4,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-10T16:30:36.423Z","etag":null,"topics":["air-pollution","air-quality","pms7003","raspberry-pi"],"latest_commit_sha":null,"homepage":"","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/tomasz-lewicki.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}},"created_at":"2018-10-08T16:16:10.000Z","updated_at":"2024-12-19T00:04:12.000Z","dependencies_parsed_at":"2022-08-29T06:51:30.705Z","dependency_job_id":null,"html_url":"https://github.com/tomasz-lewicki/pms7003","commit_stats":null,"previous_names":["tomek-l/pms7003"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tomasz-lewicki%2Fpms7003","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tomasz-lewicki%2Fpms7003/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tomasz-lewicki%2Fpms7003/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tomasz-lewicki%2Fpms7003/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tomasz-lewicki","download_url":"https://codeload.github.com/tomasz-lewicki/pms7003/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":233472832,"owners_count":18681452,"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":["air-pollution","air-quality","pms7003","raspberry-pi"],"created_at":"2025-01-11T11:19:58.183Z","updated_at":"2025-01-11T11:19:58.621Z","avatar_url":"https://github.com/tomasz-lewicki.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# A minimalistic python interface for PMS7003 sensor\n\nThe code reads PM values from serial port. Tested on Raspberry Pi, but it should work on any machine with Python and serial port.\n\nDevice description: \u003chttps://aqicn.org/sensor/pms5003-7003/\u003e\n\n## Setup\n\nTo install the driver, simply do:\n```bash\npip3 install pms7003\n```\n\n## Usage example\n\n```python\nfrom pms7003 import Pms7003Sensor, PmsSensorException\n\nif __name__ == '__main__':\n\n    sensor = Pms7003Sensor('/dev/serial0')\n\n    while True:\n        try:\n            print(sensor.read())\n        except PmsSensorException:\n            print('Connection problem')\n\n    sensor.close()\n```\n\nThe read function has an option of returning values as a dict or OrderedDict.\n\n```python\nsensor.read(ordered=True)\n```\n\n## Usage example with threading:\n\n```python\nimport time\nfrom pms7003 import Pms7003Thread\n\nif __name__ == \"__main__\":\n\n    with Pms7003Thread(\"/dev/serial0\") as sensor:\n\n        while True:\n            print(sensor.measurements)\n            # We're free to do computation in main thread \n            a = 2**32\n            time.sleep(1)\n```\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftomasz-lewicki%2Fpms7003","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftomasz-lewicki%2Fpms7003","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftomasz-lewicki%2Fpms7003/lists"}