This is a generic embedded driver for the Sensirion SEN5x sensor modules. It enables developers to communicate with the SEN54/SEN55 sensor module on different hardware platforms by only adapting the I2C communication related source files.
- SEN50 (only particulate matter signals available)
- SEN54 (no NOx signal available)
- SEN55 (full feature set)
Your sensor has the five different connectors: VCC, GND, SDA, SCL, SEL (the sixth connector will not be used for now).
Pin | Name | Description | Comments |
---|---|---|---|
1 | VCC | Supply Voltage | 5V ±10% |
2 | GND | Ground | |
3 | SDA | I2C: Serial data input / output | TTL 5V and LVTTL 3.3V compatible |
4 | SCL | I2C: Serial clock input | TTL 5V and LVTTL 3.3V compatible |
5 | SEL | Interface select | Pull to GND to enable I2C interface |
6 | NC | Do not connect |
So we need to adjust two files according to your platform.
This file contains the implementation of the sensor communication, which depends on your hardware platform. We provide
function stubs for your hardware's own implementation. Sample implementations are available for some platforms:
sample-implementations
. For Linux based platforms like Raspberry Pi you can just replace the
unimplemented HAL template with the implementation in sample-implementations/linux_user_space/
:
cp sample-implementations/linux_user_space/sensirion_i2c_hal.c ./
Skip this part for Linux based platforms since everything is already setup for this case.
Otherwise you need to check if