{"id":22466379,"url":"https://github.com/sensirion/raspberry-pi-i2c-sen66","last_synced_at":"2026-04-30T00:32:48.264Z","repository":{"id":265079754,"uuid":"880715055","full_name":"Sensirion/raspberry-pi-i2c-sen66","owner":"Sensirion","description":"C driver to work with Sensirion's SEN66 environmental sensor modules via I2C","archived":false,"fork":false,"pushed_at":"2025-03-13T14:00:48.000Z","size":531,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-27T15:18:19.581Z","etag":null,"topics":["all-in-one","co2","driver","environmental-monitoring","evaluation-kit","humidity","i2c","module","nox","particulate-matter","particulate-matter-sensor","raspberry-pi","sen66","sen6x","sen6x-sek","sensirion","sensor","temperature","voc"],"latest_commit_sha":null,"homepage":"","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":"2024-10-30T08:14:22.000Z","updated_at":"2025-03-13T13:58:56.000Z","dependencies_parsed_at":"2025-03-13T14:15:22.949Z","dependency_job_id":null,"html_url":"https://github.com/Sensirion/raspberry-pi-i2c-sen66","commit_stats":null,"previous_names":["sensirion/raspberry-pi-i2c-sen66"],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/Sensirion/raspberry-pi-i2c-sen66","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Sensirion%2Fraspberry-pi-i2c-sen66","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Sensirion%2Fraspberry-pi-i2c-sen66/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Sensirion%2Fraspberry-pi-i2c-sen66/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Sensirion%2Fraspberry-pi-i2c-sen66/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Sensirion","download_url":"https://codeload.github.com/Sensirion/raspberry-pi-i2c-sen66/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Sensirion%2Fraspberry-pi-i2c-sen66/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32449834,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-29T22:27:22.272Z","status":"ssl_error","status_checked_at":"2026-04-29T22:10:49.234Z","response_time":110,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["all-in-one","co2","driver","environmental-monitoring","evaluation-kit","humidity","i2c","module","nox","particulate-matter","particulate-matter-sensor","raspberry-pi","sen66","sen6x","sen6x-sek","sensirion","sensor","temperature","voc"],"created_at":"2024-12-06T10:11:50.970Z","updated_at":"2026-04-30T00:32:48.214Z","avatar_url":"https://github.com/Sensirion.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Sensirion Raspberry Pi I²C SEN66 Driver\n\nThe repository provides a driver for setting up a SEN66 sensor to run on a Raspberry Pi over I²C.\n\n\u003cimg src=\"images/sen6x.png\" width=\"300px\"\u003e\n\nClick [here](https://sensirion.com/sen6x-air-quality-sensor-platform) to learn more about the Sensirion SEN66 sensor.\n\n\n\nThe default I²C address of [SEN66](https://www.sensirion.com/products/catalog/SEN66) is **0x6B**.\n\n\n\n## Connect the sensor\n\nYour sensor has 4 different connectors: VDD, GND, SDA, SCL.\nUse the following pins to connect your SEN66:\n\n| *SEN66* | *Cable Color*  |   *Raspberry Pi*   |\n| :----------------: | -------------- | ------------------ |\n| VDD | red | Pin 1\n| GND | black | Pin 6\n| SDA | green | Pin 3\n| SCL | yellow | Pin 5\n\n\n\u003cimg src=\"images/raspi-i2c-pinout-3.3V.png\" width=\"400px\"\u003e\n\n\n### Detailed sensor pinout\n\n\u003cimg src=\"images/sen6x-pinout.png\" width=\"300px\"\u003e\n\n| *Pin* | *Cable Color* | *Name* | *Description*  | *Comments* |\n|-------|---------------|:------:|----------------|------------|\n| 1 | red | VDD | Supply Voltage | 3.3V ±5%\n| 2 | black | GND | Ground |\n| 3 | green | SDA | I2C: Serial data input / output | TTL 5V compatible\n| 4 | yellow | SCL | I2C: Serial clock input | TTL 5V compatible\n| 5 |  | NC | Do not connect | Ground (Pins 2 and 5 are connected internally)\n| 6 |  | NC | Do not connect | Supply voltage (Pins 1 and 6 are connected internally)\n\n\n\n## Quick start example\n\n- [Install the Raspberry Pi OS on to your Raspberry Pi](https://projects.raspberrypi.org/en/projects/raspberry-pi-setting-up)\n- [Enable the I²C interface in the raspi-config](https://www.raspberrypi.org/documentation/configuration/raspi-config.md)\n- Download the SEN66 driver from [Github](https://github.com/Sensirion/raspberry-pi-i2c-sen66) and extract the `.zip` on your Raspberry Pi\n- Connect the SEN66 sensor as explained in the [section above](#connect-the-sensor)\n\n- Compile the driver\n    1. Open a [terminal](https://projects.raspberrypi.org/en/projects/raspberry-pi-using/8)\n    2. Navigate to the driver directory. E.g. `cd ~/raspberry-pi-i2c-sen66`\n    3. Navigate to the subdirectory example-usage.\n    4. Run the `make` command to compile the driver\n\n       Output:\n       ```\n       rm -f sen66_i2c_example_usage\n       cc -Os -Wall -fstrict-aliasing -Wstrict-aliasing=1 -Wsign-conversion -fPIC -I. -o sen66_i2c_example_usage  sen66_i2c.h sen66_i2c.c sensirion_i2c_hal.h sensirion_i2c.h sensirion_i2c.c \\\n           sensirion_i2c_hal.c sensirion_config.h sensirion_common.h sensirion_common.c sen66_i2c_example_usage.c\n       ```\n- Test your connected sensor\n    - Run `./sen66_i2c_example_usage` in the same directory you used to\n      compile the driver. You should see the measurement values in the console.\n\n## Troubleshooting\n\n### Building driver failed\n\nIf the execution of `make` in the compilation step 3 fails with something like\n\n```bash\n make: command not found\n```\n\nyour RaspberryPi likely does not have the build tools installed. Proceed as follows:\n\n```\n$ sudo apt-get update\n$ sudo apt-get upgrade\n$ sudo apt-get install build-essential\n```\n\n\n### Initialization failed\n\nIf you run `./sen66_i2c_example_usage` but do not get sensor readings but something like this instead\n\n```\nError executing device_reset(): -1\nError executing get_serial_number(): -1\nError executing start_continuous_measurement(): -1\n...\n```\nthen go through the below troubleshooting steps.\n\n\n-   Ensure that you connected the sensor correctly: All cables are fully\n    plugged in and connected to the correct pin.\n-   Ensure that I²C is enabled on the Raspberry Pi. For this redo the steps on\n    \"Enable the I²C interface in the raspi-config\" in the guide above.\n-   Ensure that your user account has read and write access to the I²C device.\n    If it only works with user root (`sudo ./sen66_i2c_example_usage`), it's\n    typically due to wrong permission settings. See the next chapter how to solve this.\n\n### Missing I²C permissions\n\nIf your user is missing access to the I²C interface you should first verfiy\nthe user belongs to the `i2c` group.\n\n```\n$ groups\nusers input some other groups etc\n```\nIf `i2c` is missing in the list add the user and restart the Raspberry Pi.\n\n```\n$ sudo adduser your-user i2c\nAdding user `your-user' to group `i2c' ...\nAdding user your-user to group i2c\nDone.\n$ sudo reboot\n```\n\nIf that did not help you can make globally accessible hardware interfaces\nwith a udev rule. Only do this if everything else failed and you are\nreasoably confident you are the only one having access to your Pi.\n\nGo into the `/etc/udev/rules.d` folder and add a new file named\n`local.rules`.\n```\n$ cd /etc/udev/rules.d/\n$ sudo touch local.rules\n```\nThen add a single line `ACTION==\"add\", KERNEL==\"i2c-[0-1]*\", MODE=\"0666\"`\nto the file with your favorite editor.\n```\n$ sudo vi local.rules\n```\n\n## Contributing\n\n**Contributions are welcome!**\n\nThis Sensirion library uses\n[`clang-format`](https://releases.llvm.org/download.html) to standardize the\nformatting of all our `.c` and `.h` files. Make sure your contributions are\nformatted accordingly:\n\nThe `-i` flag will apply the format changes to the files listed.\n\n```bash\nclang-format -i *.c *.h\n```\n\nNote that differences from this formatting will result in a failed build until\nthey are fixed.\n\n\n## License\n\nSee [LICENSE](LICENSE).","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsensirion%2Fraspberry-pi-i2c-sen66","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsensirion%2Fraspberry-pi-i2c-sen66","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsensirion%2Fraspberry-pi-i2c-sen66/lists"}