This document explains how to set up the Sen sensors to run on a Raspberry Pi using the provided code, and printing the readings to the terminal.
- SFA3X
- SCD30
- SEN44
- SEN55
- SEN66
The sensor board cable has the five different connectors: VCC, GND, SDA, SCL, GND Use the following pins to connect your Board
| Board | Raspberry Pi | Jumper Wire |
|---|---|---|
| VCC | Pin 2 (5V) | Red |
| GND | Pin 6 | Black |
| SDA | Pin 3 | Green |
| SCL | Pin 5 | Yellow |
| GND | Pin 9 (GND for I2C) | Blue |
| Pin | Name | Description | Comments |
|---|---|---|---|
| 1 | GND | Ground | |
| 2 | GND | Ground | |
| 3 | SCL | I2C: Serial clock input | TTL 5V and LVTTL 3.3V compatible |
| 4 | SDA | I2C: Serial data input / output | TTL 5V and LVTTL 3.3V compatible |
| 5 | NC | Do not connect |
- Install the Raspberry Pi OS on to your Raspberry Pi
- Enable the I2C interface in the raspi-config
- Download the driver for the Sensor Board and extract the
.zipon your Raspberry Pi - Compile the driver
-
Open a terminal
-
Navigate to the driver directory. E.g.
cd ~/Biomebubble/Sensor-examble -
Run the
./Buildscript to check for updates, make sure Build essential tools are installed and compile the driverOutput:
rm -f main.o sensirion_i2c_hal.o sensirion_i2c.o sensirion_common.o sen44_i2c.o scd30_i2c.o sfa3x_i2c.o sen66_i2c.o sen5x_i2c.o test-sensors gcc -Wall -O2 -I../include -c main.c -o main.o gcc -Wall -O2 -I../include -c ../src/sensirion_i2c_hal.c -o sensirion_i2c_hal.o gcc -Wall -O2 -I../include -c ../src/sensirion_i2c.c -o sensirion_i2c.o gcc -Wall -O2 -I../include -c ../src/sensirion_common.c -o sensirion_common.o gcc -Wall -O2 -I../include -c ../src/sen44_i2c.c -o sen44_i2c.o gcc -Wall -O2 -I../include -c ../src/scd30_i2c.c -o scd30_i2c.o gcc -Wall -O2 -I../include -c ../src/sfa3x_i2c.c -o sfa3x_i2c.o gcc -Wall -O2 -I../include -c ../src/sen66_i2c.c -o sen66_i2c.o gcc -Wall -O2 -I../include -c ../src/sen5x_i2c.c -o sen5x_i2c.o gcc -Wall -O2 -I../include -o test-sensors main.o sensirion_i2c_hal.o sensirion_i2c.o sensirion_common.o sen44_i2c.o scd30_i2c.o sfa3x_i2c.o sen66_i2c.o sen5x_i2c.o # Delete object files after linking rm -f main.o sensirion_i2c_hal.o sensirion_i2c.o sensirion_common.o sen44_i2c.o scd30_i2c.o sfa3x_i2c.o sen66_i2c.o sen5x_i2c.o
-
- Test your connected sensor
- Run
./test-sensorsin the same directory you used to compile the driver.
- Run


