{"id":19738397,"url":"https://github.com/sensirion/embedded-sps","last_synced_at":"2025-04-30T05:31:17.407Z","repository":{"id":55661559,"uuid":"155872424","full_name":"Sensirion/embedded-sps","owner":"Sensirion","description":"Embedded i2c Driver for Sensirion Particulate Matter Sensors - Download the Zip Package from the Release Page","archived":false,"fork":false,"pushed_at":"2024-04-19T13:43:25.000Z","size":93,"stargazers_count":45,"open_issues_count":0,"forks_count":15,"subscribers_count":12,"default_branch":"master","last_synced_at":"2024-07-31T20:39:47.061Z","etag":null,"topics":["driver","embedded","i2c","particulate-matter","particulates-sensors","sensirion","sensirion-embedded-drivers","sensor","sps30"],"latest_commit_sha":null,"homepage":"https://github.com/Sensirion/embedded-sps/releases","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Sensirion.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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-11-02T13:49:56.000Z","updated_at":"2024-06-19T15:41:16.000Z","dependencies_parsed_at":"2024-10-26T05:50:10.357Z","dependency_job_id":"def4c33a-77f4-4130-9196-998509aba15e","html_url":"https://github.com/Sensirion/embedded-sps","commit_stats":null,"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Sensirion%2Fembedded-sps","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Sensirion%2Fembedded-sps/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Sensirion%2Fembedded-sps/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Sensirion%2Fembedded-sps/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Sensirion","download_url":"https://codeload.github.com/Sensirion/embedded-sps/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251648758,"owners_count":21621409,"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":["driver","embedded","i2c","particulate-matter","particulates-sensors","sensirion","sensirion-embedded-drivers","sensor","sps30"],"created_at":"2024-11-12T01:14:06.139Z","updated_at":"2025-04-30T05:31:17.165Z","avatar_url":"https://github.com/Sensirion.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# embedded-sps [![CircleCI](https://circleci.com/gh/Sensirion/embedded-sps.svg?style=shield)](https://circleci.com/gh/Sensirion/embedded-sps) [![GitHub license](https://img.shields.io/badge/license-BSD3-blue.svg)](https://raw.githubusercontent.com/Sensirion/embedded-sps/master/LICENSE)\nThis repository contains the embedded i2c driver sources for Sensirion's\nSPS product line.\n\nIf you just want to use the driver, it is recommended to download the release\nzip from https://github.com/Sensirion/embedded-sps/releases\n\nThe UART driver of the SPS is available in the\n[embedded-uart-sps](https://github.com/Sensirion/embedded-uart-sps) repository.\n\n*Arduino* (i2c): https://github.com/Sensirion/arduino-sps\n\n## Clone this repository\n```\ngit clone --recursive https://github.com/Sensirion/embedded-sps.git\n```\n\n## Repository content\n* `embedded-common` submodule repository for common HAL\n* `sps30-i2c` SPS30 i2c driver\n\n\n## Hardware setup\n* Make sure that the SPS30's Pin 4 (\"Interface select\") is connected to GND, on\n  power-up of the sensor, otherwise the sensor works in UART instead of i2c\n  mode. Note that the interface-select configuration is read on every start of\n  the sensor including after a soft-reset.\n\n* The i2c wires need appropriate pull-up resistors if they're not included or\n  enabled in your microprocessor.\n\n## Collecting resources\n```\nmake release\n```\nThis will create a release folder with the necessary driver files in it,\nincluding a Makefile. That way, you have just ONE folder with all the sources\nready to build your driver for your platform.\n\n## Files to adjust (from embedded-common)\nTo adapt the driver to your platform, you only need to touch the following\n\n* `sensirion_arch_config.h` (architecture specifics, you need to specify\nthe integer sizes if your compiler toolchain does not provide `stdint.h`)\n\nand depending on your i2c implementation either of the following:\n\n* `embedded-common/hw_i2c/sensirion_hw_i2c_implementation.c`\n  functions for hardware i2c communication if your platform has a dedicated I2C\n  controller.\n* `embedded-common/sw_i2c/sensirion_sw_i2c_implementation.c`\n  functions for software i2c communication if your platform does not have a\n  dedicated I2C controller and communication happens with GPIOs. In this case\n  you need to make sure that appropriate I2C pull-up resistors are used.\n\n## Building the driver\n1. Adjust `sensirion_arch_config.h` if you don't have the `\u003cstdint.h\u003e` header\n   file available.\n2. Either use one of the provided sample implementations implement necessary\n   functions in one of the `*_implementation.c` files described above (either in\n   the `hw_i2c` or `sw_i2c` folder).\n\n   To reuse a provided sample implementation you can specify it in a custom\n   build configuration. For this adapt the file `user_config.inc` in the\n   driver:\n\n   `user_config.inc` for hardware i2c with dedicated i2c controller:\n   ```\n   CONFIG_I2C_TYPE=hw_i2c\n   hw_i2c_impl_src = ${embedded-common}/hw_i2c/sample-implementations/linux_user_space/sensirion_hw_i2c_implementation.c\n   ```\n\n   `user_config.inc` for software i2c with bit-banging on GPIOs:\n   ```\n   CONFIG_I2C_TYPE=sw_i2c\n   sw_i2c_impl_src = ${embedded-common}/sw_i2c/sample-implementations/linux_user_space/sensirion_sw_i2c_implementation.c\n   ```\n\n3. Run `make`\n4. Run the compiled example usage with `./sps30_example_usage`. Note that\n   hardware access permissions (e.g. `sudo`) might be needed.\n\n---\n\nPlease check the [embedded-common](https://github.com/Sensirion/embedded-common)\nrepository for further information and sample implementations.\n\n---\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsensirion%2Fembedded-sps","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsensirion%2Fembedded-sps","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsensirion%2Fembedded-sps/lists"}