VOOZH about

URL: https://www.nuget.org/packages/nanoFramework.Iot.Device.Scd30/

⇱ NuGet Gallery | nanoFramework.Iot.Device.Scd30 1.0.930




👁 Image
nanoFramework.Iot.Device.Scd30 1.0.930

Prefix Reserved
There is a newer prerelease version of this package available.
See the version list below for details.
dotnet add package nanoFramework.Iot.Device.Scd30 --version 1.0.930
 
 
NuGet\Install-Package nanoFramework.Iot.Device.Scd30 -Version 1.0.930
 
 
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="nanoFramework.Iot.Device.Scd30" Version="1.0.930" />
 
 
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="nanoFramework.Iot.Device.Scd30" Version="1.0.930" />
 
Directory.Packages.props
<PackageReference Include="nanoFramework.Iot.Device.Scd30" />
 
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add nanoFramework.Iot.Device.Scd30 --version 1.0.930
 
 
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: nanoFramework.Iot.Device.Scd30, 1.0.930"
 
 
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package nanoFramework.Iot.Device.Scd30@1.0.930
 
 
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=nanoFramework.Iot.Device.Scd30&version=1.0.930
 
Install as a Cake Addin
#tool nuget:?package=nanoFramework.Iot.Device.Scd30&version=1.0.930
 
Install as a Cake Tool
The NuGet Team does not provide support for this client. Please contact its maintainers for support.

Sensirion SCD30 Particulate Matter Sensor

This is a library to interact with the Sensirion SCD30 Sensor Module for CO2, humidity and temperature. Currently, only the Modbus interface is implemented. The SCD30 also supports I2C, but requires clock stretching, which is currently not supported in the .NET Nanoframework ESP32 implementation.

Documentation

Usage for the Modbus interface

Important: make sure you properly setup the UART pins for ESP32 before creating the SerialPort. For this, make sure you install the nanoFramework.Hardware.Esp32 NuGet and use the Configuration class to configure the pins:

Configuration.SetPinFunction(5, DeviceFunction.COM3_TX);
Configuration.SetPinFunction(27, DeviceFunction.COM3_RX);

Initialize the SerialPort and pass it to the Scd30Sensor. You'll stay in control of the SerialPort for any exotic situations (i.e. InvertSignalLevels or multiplexing scenarios). The constructor of the Scd30Sensor will configure the SerialPort to the expected BaudRate and other settings:

var scd30 = new Scd30Sensor(new SerialPort("COM3"));

Use the scd30 to interact with the sensor, e.g.:

var firmware = scd30.ReadFirmwareVersion();
Debug.WriteLine($"SCD30 detected: Firmware version={firmware}");

Collect a measurement reliably:

scd30.SetMeasurementInterval(TimeSpan.FromSeconds(2));
scd30.StartContinuousMeasurement();
Thread.Sleep(5000);
if (scd30.GetDataReadyStatus())
{
 var measurement = scd30.ReadMeasurement();
 Debug.WriteLine($"Measurement: {measurement}");
}

The above would output the following:

SCD30 detected: Firmware version=3.66
Measurement: Co2Concentration=400.8741 ppm, Temperature=27.10421752 °C, RelativeHumidity=32.75756835 %RH

Check out the sample for more information.

I don't get any measurements and GetDataReadyStatus never returns true!

When this happens, make sure you provide enough current/voltage to your sensor. In my particular case I was providing power from the 3v3 of my Pycom WiPy to both the vin and sel pins on the SCD30. However, the measurements never worked.

Instead, connecting the 5v to the vin and the 3v3 to sel made the SCD30 work as expected. The sel must be pulled high to enable the Modbus interface.

DO NOT CONNECT 5V TO sel, it is only tolerant up to 4v so you must use a voltage divider if you do not have 3v3 available

Product Versions Compatible and additional computed target framework versions.
.NET Framework net net is compatible. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

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
2.0.0-preview.85 50 6/1/2026
2.0.0-preview.80 57 5/27/2026
2.0.0-preview.73 66 5/20/2026
2.0.0-preview.69 52 5/18/2026
2.0.0-preview.62 58 5/13/2026
2.0.0-preview.49 49 5/4/2026
2.0.0-preview.45 57 4/29/2026
2.0.0-preview.37 67 4/22/2026
2.0.0-preview.32 57 4/20/2026
2.0.0-preview.16 63 3/10/2026
1.0.930 132 3/4/2026
1.0.885 268 10/2/2025
1.0.867 229 7/28/2025
1.0.858 321 4/24/2025
1.0.847 290 4/2/2025
1.0.842 300 4/2/2025
1.0.830 322 3/11/2025
1.0.824 335 3/10/2025
1.0.816 246 3/3/2025
1.0.800 254 2/26/2025
Loading failed