nanoFramework.Iot.Device.Sen5x
1.0.326
Prefix Reserved
See the version list below for details.
dotnet add package nanoFramework.Iot.Device.Sen5x --version 1.0.326
NuGet\Install-Package nanoFramework.Iot.Device.Sen5x -Version 1.0.326
<PackageReference Include="nanoFramework.Iot.Device.Sen5x" Version="1.0.326" />
paket add nanoFramework.Iot.Device.Sen5x --version 1.0.326
#r "nuget: nanoFramework.Iot.Device.Sen5x, 1.0.326"
// Install nanoFramework.Iot.Device.Sen5x as a Cake Addin #addin nuget:?package=nanoFramework.Iot.Device.Sen5x&version=1.0.326 // Install nanoFramework.Iot.Device.Sen5x as a Cake Tool #tool nuget:?package=nanoFramework.Iot.Device.Sen5x&version=1.0.326
Sensirion SEN5x series module
This is a library to interact with the Sensirion SEN5x Environmental Node.
Description from its product page:
The SEN5x environmental node is a straightforward, all-in-one sensor solution platform for the accurate measurement of various environmental parameters, such as particulate matter, volatile organic compounds (VOCs), oxidizing gases, such as nitrogen oxide compounds (NOx), as well as humidity & temperature. Thanks to proprietary algorithms, the module enables straightforward integration into various applications. This allows device manufacturers to save valuable project time and personnel resources and focus on their core competencies. End customers receive reliable air quality measurement data based on the SEN5x and benefit from improved air quality to increase health and comfort.
Documentation
For the implementation of this library the official datasheet. Any other documentation can be found on its product page.
There are three variants at the time of this writing:
SEN50-SDN-T
, which outputs: Particulate MatterSEN54-SDN-T
, which outputs: Particulate Matter, Relative Humidity, Temperature, VOC IndexSEN55-SDN-T
, which outputs: Particulate Matter, Relative Humidity, Temperature, VOC Index, NOx Index
Note that only the SEN54-SDN-T
variant has been tested at this time. Even though the NOx-specific methods have been made available, they have not been tested.
Usage
The example project is built for ESP32 and therefor it uses the nanoFramework.Hardware.Esp32
package to configure the correct pins for the I2C interface:
Configuration.SetPinFunction(21, DeviceFunction.I2C1_DATA);
Configuration.SetPinFunction(22, DeviceFunction.I2C1_CLOCK);
Create the I2cConnectionSettings
using correct I2C bus, address and speed. You can use the constants on the Sen5xSensor
class for the defaults. Create the I2cDevice
and pass that to the Sen5xSensor
to create the instance to work with:
var settings = new I2cConnectionSettings(1, Sen5xSensor.DefaultI2cAddress, Sen5xSensor.DefaultI2cBusSpeed);
var i2c = new I2cDevice(settings);
var sensor = new Sen5xSensor(i2c);
Use sensor
for all interactions with the SEN5x sensor. The following starts the measurements, reads and prints measurements as they become ready:
sensor.StartMeasurement();
while (true)
{
if (sensor.ReadDataReadyFlag())
{
var measurement = sensor.ReadMeasurement();
Debug.WriteLine(measurement.ToString());
}
Thread.Sleep(1000);
}
Make sure to refer to the datasheet when using the more advanced features.
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET Framework | net is compatible. |
-
- nanoFramework.CoreLibrary (>= 1.15.5)
- nanoFramework.System.Buffers.Binary.BinaryPrimitives (>= 1.2.628)
- nanoFramework.System.Device.I2c (>= 1.1.16)
- UnitsNet.nanoFramework.MassConcentration (>= 5.58.0)
- UnitsNet.nanoFramework.RelativeHumidity (>= 5.58.0)
- UnitsNet.nanoFramework.Temperature (>= 5.58.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last updated |
---|---|---|
1.0.360 | 76 | 10/23/2024 |
1.0.343 | 75 | 10/3/2024 |
1.0.326 | 100 | 9/6/2024 |
1.0.318 | 80 | 8/28/2024 |
1.0.300 | 105 | 8/9/2024 |
1.0.288 | 92 | 7/26/2024 |
1.0.277 | 79 | 7/17/2024 |
1.0.260 | 92 | 6/19/2024 |
1.0.257 | 92 | 6/14/2024 |
1.0.223 | 120 | 4/15/2024 |
1.0.201 | 110 | 3/22/2024 |
1.0.181 | 114 | 2/28/2024 |
1.0.149 | 182 | 1/5/2024 |
1.0.145 | 145 | 12/20/2023 |
1.0.123 | 173 | 11/10/2023 |
1.0.103 | 120 | 11/8/2023 |
1.0.90 | 148 | 10/6/2023 |
1.0.83 | 140 | 9/27/2023 |
1.0.71 | 151 | 9/6/2023 |
1.0.65 | 161 | 8/16/2023 |
1.0.56 | 170 | 8/2/2023 |
1.0.50 | 149 | 7/28/2023 |
1.0.44 | 166 | 7/19/2023 |
1.0.41 | 151 | 7/14/2023 |
1.0.32 | 192 | 6/21/2023 |
1.0.28 | 180 | 6/14/2023 |
1.0.24 | 194 | 6/7/2023 |
1.0.22 | 217 | 6/2/2023 |
1.0.16 | 177 | 5/26/2023 |
1.0.1 | 185 | 5/13/2023 |