Send in your ideas. Deadline October 1, 2025
Grant
Theme fund: NGI0 Commons Fund
Start: 2025-08

Universal Sensor Libraries

Shared libraries for different types of sensors

The aim of this project is to provide a group of open source, portable (embedded + Linux) C/C++ libraries which interface with a wide selection of popular I2C sensors. The I2C de-facto standard of using numbered registers for configuring and taking readings from sensors allows for some user-friendly abilities. These include the ability to auto-detect most sensors based on their fixed I2C addresses and, if present, WHO_AM_I register. It also allows for a common set of functions to work with sensors from a wide variety of vendors. These two elements together gave me the inspiration to create this project - a set of sensor libraries not written for individual devices, but for a whole class of sensors. For example, IMUs (inertial measurement units) share many similarities across vendors and sensor types (e.g. accelerometer, gyroscope and magnetometer). These commonalities allow for a single API to use a long list of sensors while still supporting their unique features. This in turn will liberate users from being locked in to a specific vendor - at any point in their project development they can switch components without having to rewrite their code. The sensor categories included so far in this project are: temperature/humidity/pressure, realtime clocks, IMUs, capacitive touch screens and CO2 gas sensors. A secondary benefit of this system of auto-detecting sensors is that less experienced users can simply tell the library what GPIO pins connect the sensor to the MCU and the library will "just work" without having to be told what specific sensor is in use, nor the I2C address it uses.

    Run by Select or enter

    Logo NLnet: abstract logo of four people seen from above Logo NGI Zero: letterlogo shaped like a tag

    This project was funded through the NGI0 Commons Fund, a fund established by NLnet with financial support from the European Commission's Next Generation Internet programme, under the aegis of DG Communications Networks, Content and Technology under grant agreement No 101135429. Additional funding is made available by the Swiss State Secretariat for Education, Research and Innovation (SERI).