All Projects → Sensirion → embedded-sps

Sensirion / embedded-sps

Licence: BSD-3-Clause license
Embedded i2c Driver for Sensirion Particulate Matter Sensors - Download the Zip Package from the Release Page

Programming Languages

c
50402 projects - #5 most used programming language
C++
36643 projects - #6 most used programming language
Makefile
30231 projects
PHP
23972 projects - #3 most used programming language
NASL
115 projects

Projects that are alternatives of or similar to embedded-sps

arduino-sps
Arduino library for Sensirion SPS30
Stars: ✭ 36 (+0%)
Mutual labels:  i2c, particulate-matter, particulates-sensors, sensirion, sps30
embedded-sht
Embedded SHT Drivers for Sensirion Temperature and Humidity Sensors - Download the Zip Package from the Release Page
Stars: ✭ 53 (+47.22%)
Mutual labels:  i2c, sensor, driver, sensirion, sensirion-embedded-drivers
embedded-ccs811-rs
Platform agnostic Rust driver for the CCS811 ultra-low power digital gas sensor for monitoring indoor air quality
Stars: ✭ 12 (-66.67%)
Mutual labels:  embedded, i2c, sensor, driver
arduino-sht
Repository for Sensirion humidity and temperature sensor support on Arduino
Stars: ✭ 43 (+19.44%)
Mutual labels:  i2c, sensor, driver, sensirion
pwm-pca9685-rs
Platform-agnostic Rust driver for the PCA9685 I2C 16-channel, 12-bit PWM/Servo/LED controller
Stars: ✭ 19 (-47.22%)
Mutual labels:  embedded, i2c, driver
sps30
Sensirion SPS30 driver for ESP32, SODAQ, MEGA2560, UNO, ESP8266, Particle-photon on UART OR I2C coummunication
Stars: ✭ 57 (+58.33%)
Mutual labels:  sensor, sensirion, sps30
rust-radio-sx127x
Rust driver for the Semtech SX127x series of Sub-GHz LoRa/ISM radio transceivers
Stars: ✭ 21 (-41.67%)
Mutual labels:  embedded, driver
Waterius
Передача показаний воды по Wi-Fi. Watermeter Wi-Fi transmitter.
Stars: ✭ 295 (+719.44%)
Mutual labels:  embedded, i2c
Embedded Notes
嵌入式linux软件开发、嵌入式linux驱动开发、c语言、单片机开发、IOT开发等面试要点记录
Stars: ✭ 487 (+1252.78%)
Mutual labels:  embedded, driver
Rust I2cdev
Rust library for interfacing with i2c devices under Linux
Stars: ✭ 119 (+230.56%)
Mutual labels:  embedded, i2c
Ha4iot
Open Source Home Automation system for .NET
Stars: ✭ 146 (+305.56%)
Mutual labels:  i2c, sensor
Lv drivers
TFT and touch pad drivers for LVGL embedded GUI library
Stars: ✭ 84 (+133.33%)
Mutual labels:  embedded, driver
Drivers
TinyGo drivers for sensors and other devices that use I2C, SPI, GPIO, ADC, and UART interfaces.
Stars: ✭ 250 (+594.44%)
Mutual labels:  embedded, i2c
IOsonata
IOsonata multi-platform multi-architecture power & performance optimized software library for fast and easy IoT MCU firmware development. Object Oriented design, no board package to define, just pure plug & play any boards
Stars: ✭ 40 (+11.11%)
Mutual labels:  embedded, i2c
I2c Moisture Sensor
I2C based soil moisture sensor
Stars: ✭ 194 (+438.89%)
Mutual labels:  i2c, sensor
Ehal
Embedded Hardware Abstraction Library
Stars: ✭ 84 (+133.33%)
Mutual labels:  embedded, sensor
gspca-kinect2
Kinect2 Sensor Device Driver for Linux
Stars: ✭ 25 (-30.56%)
Mutual labels:  sensor, driver
MPU-9250-Sensors-Data-Collect
MPU9250 (MPU6500 + AK8963) I2C Driver in Python for Raspbery PI
Stars: ✭ 51 (+41.67%)
Mutual labels:  i2c, driver
BME680
Arduino Library to access the Bosch BME680 - temperature, pressure, humidity and gas sensor
Stars: ✭ 30 (-16.67%)
Mutual labels:  i2c, sensor
Esp8266 Oled Ssd1306
Driver for the SSD1306 and SH1106 based 128x64, 128x32, 64x48 pixel OLED display running on ESP8266/ESP32
Stars: ✭ 1,590 (+4316.67%)
Mutual labels:  i2c, driver

embedded-sps CircleCI GitHub license

This repository contains the embedded i2c driver sources for Sensirion's SPS product line.

If you just want to use the driver, it is recommended to download the release zip from https://github.com/Sensirion/embedded-sps/releases

The UART driver of the SPS is available in the embedded-uart-sps repository.

Arduino (i2c): https://github.com/Sensirion/arduino-sps

Clone this repository

git clone --recursive https://github.com/Sensirion/embedded-sps.git

Repository content

  • embedded-common submodule repository for common HAL
  • sps30-i2c SPS30 i2c driver

Hardware setup

  • Make sure that the SPS30's Pin 4 ("Interface select") is connected to GND, on power-up of the sensor, otherwise the sensor works in UART instead of i2c mode. Note that the interface-select configuration is read on every start of the sensor including after a soft-reset.

  • The i2c wires need appropriate pull-up resistors if they're not included or enabled in your microprocessor.

Collecting resources

make release

This will create a release folder with the necessary driver files in it, including a Makefile. That way, you have just ONE folder with all the sources ready to build your driver for your platform.

Files to adjust (from embedded-common)

To adapt the driver to your platform, you only need to touch the following

  • sensirion_arch_config.h (architecture specifics, you need to specify the integer sizes if your compiler toolchain does not provide stdint.h)

and depending on your i2c implementation either of the following:

  • embedded-common/hw_i2c/sensirion_hw_i2c_implementation.c functions for hardware i2c communication if your platform has a dedicated I2C controller.
  • embedded-common/sw_i2c/sensirion_sw_i2c_implementation.c functions for software i2c communication if your platform does not have a dedicated I2C controller and communication happens with GPIOs. In this case you need to make sure that appropriate I2C pull-up resistors are used.

Building the driver

  1. Adjust sensirion_arch_config.h if you don't have the <stdint.h> header file available.

  2. Either use one of the provided sample implementations implement necessary functions in one of the *_implementation.c files described above (either in the hw_i2c or sw_i2c folder).

    To reuse a provided sample implementation you can specify it in a custom build configuration. For this adapt the file user_config.inc in the driver:

    user_config.inc for hardware i2c with dedicated i2c controller:

    CONFIG_I2C_TYPE=hw_i2c
    hw_i2c_impl_src = ${embedded-common}/hw_i2c/sample-implementations/linux_user_space/sensirion_hw_i2c_implementation.c
    

    user_config.inc for software i2c with bit-banging on GPIOs:

    CONFIG_I2C_TYPE=sw_i2c
    sw_i2c_impl_src = ${embedded-common}/sw_i2c/sample-implementations/linux_user_space/sensirion_sw_i2c_implementation.c
    
  3. Run make

  4. Run the compiled example usage with ./sps30_example_usage. Note that hardware access permissions (e.g. sudo) might be needed.


Please check the embedded-common repository for further information and sample implementations.


Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].