{"id":19738428,"url":"https://github.com/sensirion/raspberry-pi-i2c-sdp","last_synced_at":"2026-05-11T13:31:59.075Z","repository":{"id":149346037,"uuid":"401739445","full_name":"Sensirion/raspberry-pi-i2c-sdp","owner":"Sensirion","description":"RaspberryPi driver for Sensirion SDP sensors.","archived":false,"fork":false,"pushed_at":"2024-05-23T18:20:45.000Z","size":3078,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-01-10T19:29:48.582Z","etag":null,"topics":["differential-pressure","raspberry-pi","sdp","sdp3x","sdp800","sdp810","sdp8xx","sensirion","sensirion-sensor"],"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":"2021-08-31T14:46:04.000Z","updated_at":"2024-10-09T15:46:58.000Z","dependencies_parsed_at":"2025-01-10T19:29:52.124Z","dependency_job_id":"ea9f392b-84d9-463e-8471-ee1b1ebd8140","html_url":"https://github.com/Sensirion/raspberry-pi-i2c-sdp","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Sensirion%2Fraspberry-pi-i2c-sdp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Sensirion%2Fraspberry-pi-i2c-sdp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Sensirion%2Fraspberry-pi-i2c-sdp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Sensirion%2Fraspberry-pi-i2c-sdp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Sensirion","download_url":"https://codeload.github.com/Sensirion/raspberry-pi-i2c-sdp/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241067936,"owners_count":19903920,"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":["differential-pressure","raspberry-pi","sdp","sdp3x","sdp800","sdp810","sdp8xx","sensirion","sensirion-sensor"],"created_at":"2024-11-12T01:14:10.004Z","updated_at":"2026-05-11T13:31:54.048Z","avatar_url":"https://github.com/Sensirion.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Sensirion Raspberry Pi I2C SDP Driver\n\nThis document explains how to set up the SDP sensor to run on a Raspberry Pi\nusing the provided code.\n\n\u003ccenter\u003e\u003cimg src=\"images/SDP8xx.png\" width=\"250px\"\u003e\u003cimg src=\"images/SDP3x.png\" width=\"250px\"\u003e\u003c/center\u003e\n\n\nClick [here](https://sensirion.com/products/catalog/EK-P4/) to learn more about the SDP3x Sensor Evaluation Kit.\n\nClick [here](https://sensirion.com/products/catalog/EK-P5/) to learn more about the SDP8xx series Sensor Evaluation Kit.\n\n\n## Setup Guide\n\n### Connecting the Sensor\n\nYour sensor has the four different connectors: VCC, GND, SDA, SCL. Use\nthe following pins to connect your Sdp:\n\n *Sdp*  |    *Raspberry Pi*\n :------: | :------------------:\n   VCC    |        Pin 1\n   GND    |        Pin 6\n   SDA    |        Pin 3\n   SCL    |        Pin 5\n\n\u003ccenter\u003e\u003cimg src=\"images/sdp8xx-pinout.png\" width=\"900px\"\u003e\u003c/center\u003e\n\n\u003ccenter\u003e\u003cimg src=\"images/GPIO-Pinout-Diagram.png\" width=\"900px\"\u003e\u003c/center\u003e\n\n### Setting sensor address ###\n\nDepending on whether you connect a SDP3x or SDP8xx configure the correct i2c address in sdp_i2c.h (SDP_I2C_ADDRESS).\n\n### Raspberry Pi\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 I2C interface in the raspi-config](https://www.raspberrypi.org/documentation/configuration/raspi-config.md)\n- Download the driver for the [Sensirion Github Page](https://github.com/Sensirion/raspberry-pi-i2c-sdp) and extract the `.zip` on your Raspberry Pi\n- Compile the driver\n    1. Open a [terminal](https://www.raspberrypi.org/documentation/usage/terminal/?)\n    2. Navigate to the driver directory. E.g. `cd ~/raspberry-pi-i2c-sdp`\n    3. Run the `make` command to compile the driver\n\n       Output:\n       ```\n       rm -f sdp_i2c_example_usage\n       cc -Os -Wall -fstrict-aliasing -Wstrict-aliasing=1 -Wsign-conversion -fPIC -I. -o sdp_i2c_example_usage  sdp_i2c.h sdp_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 sdp_i2c_example_usage.c\n       ```\n- Test your connected sensor\n    - Run `./sdp_i2c_example_usage` in the same directory you used to\n      compile the driver.\n\n      Output:\n      ```\n      Product number: 0x03020b01\n      Serial Number: 1902067650\n      Differential pressure: -0.17 Pa\n      Temperature: 28.80 °C\n      Differential pressure: -0.03 Pa\n      Temperature: 28.80 °C\n      Differential pressure: -0.03 Pa\n      Temperature: 28.80 °C\n      Differential pressure: -0.03 Pa\n      ...\n      ```\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\u003e -bash: make: command not found\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### Initialization failed\n\n```\nError executing sdp_get_serial_number(): -1\nError executing sdp_read_product_identifier(): -1\nError executing sdp_start_continuous_measurement_with_diff_pressure_t_comp_and_averaging(): -1\nError executing sdp_read_measurement(): -1\n```\n\nthen go through the below troubleshooting steps.\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 I2C is enabled on the Raspberry Pi. For this redo the steps on\n    \"Enable the I2C interface in the raspi-config\" in the guide above.\n-   Ensure that your user account has read and write access to the I2C device.\n    If it only works with user root (`sudo ./sdp_i2c_example_usage`), it's\n    typically due to wrong permission settings. See the next chapter how to solve this.\n\n### Missing I2C permissions\n\nIf your user is missing access to the I2C 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","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsensirion%2Fraspberry-pi-i2c-sdp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsensirion%2Fraspberry-pi-i2c-sdp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsensirion%2Fraspberry-pi-i2c-sdp/lists"}