Skip to content
/ info Public

Overview over the Sensirion Github repositories & available sensor drivers

Notifications You must be signed in to change notification settings

Sensirion/info

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

48 Commits
 
 

Repository files navigation

Overview of Sensirion's GitHub Repositories

Reference Drivers Arduino Python Raspberry Pi Developer Community

Table of Contents

  1. Preface
  2. Reference Drivers and Examples
    1. Repositories
    2. Concept
    3. Example use
  3. Arduino Drivers and Examples
  4. Python Packages
  5. RaspberryPi Drivers and Examples
  6. Third party repositories provided by our developer community
    1. Linux Kernel drivers
    2. From Paul van Haastrecht
    3. Sparkfun
    4. Adafruit
    5. Seeedstudio
    6. Rust packages
    7. Node packages

Preface

The goal of this page is to help users navigate the various driver offerings by Sensirion.

«Platform independent drivers requiring minimal porting efforts»

Sensirion is offering reference driver implementations that are meant to support customers in their product designs. These are tested extensively, and cover most of the common functionality of our sensors. They are also written in a platform independent way, to enable easy porting to new platforms. Because of that, they tend to be a bit more complex than a simple platform specific library, but offer peace of mind for the user to freely move to a different hardware platform with minimal adjustments. These drivers are described in the Reference Drivers and Examples section below.

Reference Drivers

«Platform specific prototyping starters»

We are also offering some platform specific libraries and code snippets to boost your prototyping activities. We have an extensive set of Arduino drivers and examples and Python packages, which can be used to communicate with our sensors via the Sensirion SensorBridge (Sensirion Evaluation Kit) .

We also offer some preconfigured and simplified variations of the reference drivers for the RaspberryPi platform. See the section RaspberryPi Drivers and Examples

Arduino RaspberryPi Python

«Thank you to the open source community»

Lastly, there's a few third party repositories that we wanted to include. Please note that Sensirion is creating these projects and therefore being listed there is not an official endorsement, but there's really great work out there by our community that we wanted to share with you!

Community Picks

Finally, feel free to report any issues you have with the drivers on the respective GitHub repository. If you have questions beyond the drivers we're sharing here - for example anything that's related to the sensors themselves, rather than the drivers - the best way to get help is to use the contact form on the Sensirion website.

For more information, please also check out or Developer Website.

Reference Drivers and Examples

Generic drivers for all platforms from small-scale embedded-systems to full-scale Operating Systems.

Repositories

Product Function Bus Repository
Gas Index Algorithm Algorithm providing Index output signals from the SGP40/41 raw signals I2C gas-index-algorithm
SCD Carbon Dioxide (CO2) I2C embedded-scd
SCD30 Carbon Dioxide (CO2) I2C embedded-i2c-scd30
SCD4X Carbon Dioxide (CO2) I2C embedded-i2c-scd4x
SDP Differential Pressure I2C embedded-i2c-sdp
SEN44 Multi Sensor Environmental Nodes I2C embedded-i2c-sen44
SEN44 Multi Sensor Environmental Nodes UART embedded-uart-sen44
SEN5x Multi Sensor Environmental Nodes I2C embedded-i2c-sen5x
SFA3X Formaldehyde I2C embedded-sfa3x
SFM Gas Flow Meter I2C embedded-sfm
SFM3003 Gas Flow Meter I2C embedded-i2c-sfm-sf06
SFM3012 Gas Flow Meter I2C embedded-i2c-sfm-sf06
SFM3019 Gas Flow Meter I2C embedded-i2c-sfm-sf06
SFM3119 Gas Flow Meter I2C embedded-i2c-sfm-sf06
SFM4300 Gas Flow Meter I2C embedded-i2c-sfm-sf06
SGP Metal-Oxide (MOX) Gas I2C embedded-sgp
SGP40 Metal-Oxide (MOX) Gas I2C embedded-i2c-sgp40
SGP41 Metal-Oxide (MOX) Gas I2C embedded-i2c-sgp41
SHT Humidity and Temperature I2C embedded-sht
SHT3x Humidity and Temperature I2C embedded-i2c-sht3x
SHT4x Humidity and Temperature I2C embedded-i2c-sht4x
SPS Particulate Matter I2C embedded-sps
SPS Particulate Matter UART embedded-uart-sps
STC3x Carbon Dioxide (CO2) I2C embedded-i2c-stc3x
STS Temperature I2C embedded-sts
STS3x Temperature I2C embedded-i2c-sts3x
STS4x Temperature I2C embedded-i2c-sts4x
SVM4x Metal-Oxide (MOX) Gas I2C embedded-i2c-svm4x
SVM4x Metal-Oxide (MOX) Gas UART embedded-uart-svm4x
SLF3x Liquid Flow I2C embedded-i2c-sf06-lf
LD20 Liquid Flow I2C embedded-i2c-sf06-lf

Shared code can be found here https://github.com/Sensirion/embedded-common

Concept

Our reference drivers are our suggested starting point to implement stable products. They are tested intensively, and we provide support to our customers in case they face unexpected behaviour of the code.

It is implemented in a platform independent way, by means of a small "Hardware Abstraction Layer" (HAL) which abstracts the interface level commands (I2C, delay functions etc.) from the sensor readout protocols and timing. Because of that, the drivers can be ported to new platforms rather easily.

We currently support a range of sample implementation. At the time of writing this document, the following platforms are supported:

  • Linux (with the I2C userspace interface, see below for Linux Kernel drivers)
  • MBED OS
  • Arduino Wire library (plus alternative I2C library)
  • Microchip SAMD2
  • Nordic nRF51
  • STM32F1
  • Zephyr (User Space)

The complete list of implementations is availble in the embedded-common repository.

Example use

To build a driver, there's three steps that need to be completed:

  1. Download the release zip file from GitHub
  2. Configure your platform, or build your own platform support file
  3. Compile example / integrate into your application

As an example, for the SHTC1 humidity sensor for Linux user space:

  1. Download the latest release zip file from https://github.com/Sensirion/embedded-sht/releases and unzip
  2. Copy embedded-common/i2c/sample-implementations/linux_user_space/sensirion_i2c_hal.c to embedded-common/i2c/, thereby overwriting the empty sample implementation provided as starting point for new platform support.
  3. type make shtc1_example_usage

After that, you should have an executable called shtc1_example_usage that will read out the SHTC1 sensor. Run it with ./shtc1_example_usage. Depending on the permissions on the I2C device file (which is defined as #define I2C_DEVICE_PATH "/dev/i2c-1" in the provided sample implementation) you might have to add your user to the respective group or run as root with sudo ./shtc1_example_usage.

Arduino Drivers and Examples

To simplify developing on the Arduino platform, we offer a range of dedicated libraries. Those are available directly though the Library Manager in the Arduino IDE or here on GitHub, so installation is just a few mouse clicks away.

The code can be found in the following repositories:

Product Function Bus Repository
Gas Index Algorithm Algorithm providing Index output signals from the SGP40/41 raw signals I2C arduino-gas-index-algorithm
SCD30 Carbon Dioxide (CO2) I2C arduino-i2c-scd30
SCD4X Carbon Dioxide (CO2) I2C arduino-i2c-scd4x
SDP Differential Pressure I2C arduino-i2c-sdp
SDP Differential Pressure I2C arduino-sdp
SEN44 Multi Sensor Environmental Nodes I2C arduino-i2c-sen44
SEN44 Multi Sensor Environmental Nodes UART arduino-uart-sen44
SEN5x Multi Sensor Environmental Nodes I2C arduino-i2c-sen5x
SFA3X Formaldehyde I2C arduino-i2c-sfa3x
SFA3X Formaldehyde UART arduino-uart-sfa3x
SFM3000 Gas Flow Meter I2C arduino-i2c-sfm3000
SFM3003 Gas Flow Meter I2C arduino-i2c-sfm-sf06
SFM3012 Gas Flow Meter I2C arduino-i2c-sfm-sf06
SFM3019 Gas Flow Meter I2C arduino-i2c-sfm-sf06
SFM3119 Gas Flow Meter I2C arduino-i2c-sfm-sf06
SFM4300 Gas Flow Meter I2C arduino-i2c-sfm-sf06
SFM6000 Gas Flow Meter UART arduino-uart-sfx6xxx
SFC6000 Mass Flow Controller UART arduino-uart-sfx6xxx
SGP40 Metal-Oxide (MOX) Gas I2C arduino-i2c-sgp40
SGP41 Metal-Oxide (MOX) Gas I2C arduino-i2c-sgp41
SHT Humidity and Temperature I2C arduino-sht
SHT3x Humidity and Temperature I2C arduino-i2c-sht3x
SHT4x Humidity and Temperature I2C arduino-i2c-sht4x
STS3x Temperature I2C arduino-i2c-sts3x
STS4x Temperature I2C arduino-i2c-sts4x
SLF3x Liquid Flow Meter I2C arduino-liquid-flow
SPS Particulate Matter I2C arduino-sps
STC3X Carbon Dioxide (CO2) I2C arduino-i2c-stc3x
SVM4x Metal-Oxide (MOX) Gas I2C arduino-i2c-svm4x
SVM4x Metal-Oxide (MOX) Gas UART arduino-uart-svm4x
SLF3x Liquid Flow I2C arduino-i2c-sf06-lf
LD20 Liquid Flow I2C arduino-i2c-sf06-lf

Shared code can be found here: Arduino Core

Finally, we offer some snippets to bootstrap our flow sensor based prototypes (SLG, SLI, SLS, SLQ-QTxxx, LG16-xxxxD, LS32, LPG10, LD20 and SLF3x): Arduino Liquid Flow Snippets

Want to understand every single step of your Arduino driver in one file? Check the Arduino Snippets and learn it from scratch.

Python Packages

The python packages work with our I2C and UART (SHDLC) sensors when attached to a compatible system. Compatible means, that the system provides an I2C Interface (e.g. a Raspberry Pi on Linux) for I2C sensors, or a COM-Port/Character device for UART (SHDLC) sensors. The Python drivers also work for I2C sensors attached with a SensorBridge

Product Function Bus Repository
SensorBridge USB to I2C Gateway USB python-shdlc-sensorbridge
Gas Index Algorithm Algorithm providing Index output signals from the SGP40/41 raw signals I2C gas-index-algorithm
SCD30 Carbon Dioxide (CO2) I2C python-i2c-scd30
SCD4x Carbon Dioxide (CO2) I2C python-i2c-scd
SDP Differential Pressure I2C python-i2c-sdp
SFA3X Formaldehyde UART python-shdlc-sfa3x
SFC5XXX Mass Flow Controller for Gasses UART python-shdlc-sfc5xxx
SFC6000 Mass Flow Controller UART python-uart-sfx6xxx
SFM3003 Gas Flow Meter I2C python-i2c-sfm-sf06
SFM3012 Gas Flow Meter I2C python-i2c-sfm-sf06
SFM3019 Gas Flow Meter I2C python-i2c-sfm-sf06
SFM3119 Gas Flow Meter I2C python-i2c-sfm-sf06
SFM4300 Gas Flow Meter I2C python-i2c-sfm-sf06
SFM6000 Gas Flow Meter UART python-uart-sfx6xxx
SGP4X Metal-Oxide (MOX) Gas I2C python-i2c-sgp4x
SHT Humidity and Temperature I2C python-i2c-sht
SHT3x Humidity and Temperature I2C python-i2c-sht3x
STC Carbon Dioxide (CO2) I2C python-i2c-stc
SVM4x Metal-Oxide (MOX) Gas I2C python-i2c-svm4x
SVM4x Metal-Oxide (MOX) Gas UART python-shdlc-svm4x
SLF3x Liquid Flow I2C python-i2c-sf06-lf
LD20 Liquid Flow I2C python-i2c-sf06-lf
SEN5x Multi Sensor Environmental Nodes I2C python-i2c-sen5x

Raspberry Pi Drivers and Examples

The Raspberry Pi drivers are Reference Drivers, which we configured for Raspberry Pi and should work out of the box. See the corresponding README.md files for detailed setup and installation instructions.

Learn how to port any Reference Drivers to Raspberry Pi by reading this section.

Product Function Bus Repository
Gas Index Algorithm Algorithm providing Index output signals from the SGP40/41 raw signals I2C gas-index-algorithm
SCD30 Carbon Dioxide (CO2) I2C raspberry-pi-i2c-scd30
SCD4X Carbon Dioxide (CO2) I2C raspberry-pi-i2c-scd4x
SDP Differential Pressure I2C raspberry-pi-i2c-sdp
SEN44 Multi Sensor Environmental Nodes I2C raspberry-pi-i2c-sen44
SEN44 Multi Sensor Environmental Nodes UART raspberry-pi-uart-sen44
SEN5x Multi Sensor Environmental Nodes I2C raspberry-pi-i2c-sen5x
SFA3X Formaldehyde I2C raspberry-pi-i2c-sfa3x
SFA3X Formaldehyde UART raspberry-pi-uart-sfa3x
SGP40 Metal-Oxide (MOX) Gas I2C raspberry-pi-i2c-sgp40
SGP41 Metal-Oxide (MOX) Gas I2C raspberry-pi-i2c-sgp41
SHT3x Humidity and Temperature I2C raspberry-pi-i2c-sht3x
SHT4x Humidity and Temperature I2C raspberry-pi-i2c-sht4x
STS3x Temperature I2C raspberry-pi-i2c-sts3x
STS4x Temperature I2C raspberry-pi-i2c-sts4x
STC3X Carbon Dioxide (CO2) I2C raspberry-pi-i2c-stc3x
SVM4x Metal-Oxide (MOX) Gas I2C raspberry-pi-i2c-svm4x
SVM4x Metal-Oxide (MOX) Gas UART raspberry-pi-uart-svm4x
SLF3x Liquid Flow I2C raspberry-pi-i2c-sf06-lf
LD20 Liquid Flow I2C raspberry-pi-i2c-sf06-lf
SFM3003 Gas Flow Meter I2C raspberry-pi-i2c-sfm-sf06
SFM3012 Gas Flow Meter I2C raspberry-pi-i2c-sfm-sf06
SFM3019 Gas Flow Meter I2C raspberry-pi-i2c-sfm-sf06
SFM3119 Gas Flow Meter I2C raspberry-pi-i2c-sfm-sf06
SFM4300 Gas Flow Meter I2C raspberry-pi-i2c-sfm-sf06
SFM6000 Gas Flow Meter UART raspberry-pi-uart-sfx6xxx
SFC6000 Mass Flow Controller UART raspberry-pi-uart-sfx6xxx

Third party repositories provided by our developer community

⚠️ Please note that libraries listed in this section are not maintained by Sensirion, and are not supported by Sensirion.

Note that this list does not claim to be complete. If you would like to have your repository listed here, please submit a pull request or file an issue containing the github URL. Thanks!

Linux Kernel drivers

While our reference drivers above support Linux' userspace I2C interface, there's also the option to build them into the kernel. Some of those drivers were authored by Sensirion (and are now maintained as part of the Linux kernel). The following drivers are available:

Via HWMON interface

Via IIO interface

From Paul van Haastrecht

Sparkfun

Adafruit

Seeedstudio

Rust packages

Sensirion HDLC

SPS30 UART

SPS30 I2C

SHTCX Driver

SHT3x Driver

SGP30 Driver

Node packages

Sensirion HDLC

Node package which uses Node SerialPort and RXJS to implement Sensirion HDLC.

About

Overview over the Sensirion Github repositories & available sensor drivers

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published