VOOZH about

URL: https://www.nuget.org/packages/nanoFramework.Iot.Device.Shtc3/2.0.0-preview.45

⇱ NuGet Gallery | nanoFramework.Iot.Device.Shtc3 2.0.0-preview.45




👁 Image
nanoFramework.Iot.Device.Shtc3 2.0.0-preview.45

Prefix Reserved
This is a prerelease version of nanoFramework.Iot.Device.Shtc3.
There is a newer prerelease version of this package available.
See the version list below for details.
dotnet add package nanoFramework.Iot.Device.Shtc3 --version 2.0.0-preview.45
 
 
NuGet\Install-Package nanoFramework.Iot.Device.Shtc3 -Version 2.0.0-preview.45
 
 
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.Shtc3" Version="2.0.0-preview.45" />
 
 
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="nanoFramework.Iot.Device.Shtc3" Version="2.0.0-preview.45" />
 
Directory.Packages.props
<PackageReference Include="nanoFramework.Iot.Device.Shtc3" />
 
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.Shtc3 --version 2.0.0-preview.45
 
 
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: nanoFramework.Iot.Device.Shtc3, 2.0.0-preview.45"
 
 
#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.Shtc3@2.0.0-preview.45
 
 
#: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.Shtc3&version=2.0.0-preview.45&prerelease
 
Install as a Cake Addin
#tool nuget:?package=nanoFramework.Iot.Device.Shtc3&version=2.0.0-preview.45&prerelease
 
Install as a Cake Tool
The NuGet Team does not provide support for this client. Please contact its maintainers for support.

SHTC3 - Temperature & Humidity Sensor

SHTC3 is a digital humidity and temperature sensor designed especially for battery-driven high-volume consumer electronics application. To reduce power cosumption this project use capability of sensor to allow measurement in low power mode and active sleep mode.

Documentation

Usage

Hardware Required

  • SHTC3
  • Male/Female Jumper Wires

Circuit

  • SCL - SCL
  • SDA - SDA
  • VCC - 3.3V
  • GND - GND

Code

Important: make sure you properly setup the I2C pins especially for ESP32 before creating the I2cDevice, make sure you install the nanoFramework.Hardware.ESP32 nuget:

//////////////////////////////////////////////////////////////////////
// when connecting to an ESP32 device, need to configure the I2C GPIOs
// used for the bus
Configuration.SetPinFunction(21, DeviceFunction.I2C1_DATA);
Configuration.SetPinFunction(22, DeviceFunction.I2C1_CLOCK);

For other devices like STM32, please make sure you're using the preset pins for the I2C bus you want to use.

I2cConnectionSettings settings = new I2cConnectionSettings(1, Shtc3.DefaultI2cAddress);
I2cDevice device = I2cDevice.Create(settings);

using (Shtc3 sensor = new Shtc3(device))
{
 Debug.WriteLine($"Sensor Id: {sensor.Id}");

 while (true)
 {
 if (sensor.TryGetTemperatureAndHumidity(out var temperature, out var relativeHumidity))
 {
 Debug.WriteLine($"Temperature: {temperature.DegreesCelsius:0.#}\u00B0C");
 Debug.WriteLine($"Relative humidity: {relativeHumidity.Percent:0.#}%");
 // WeatherHelper supports more calculations, such as saturated vapor pressure, actual vapor pressure and absolute humidity.
 Debug.WriteLine($"Heat index: {WeatherHelper.CalculateHeatIndex(temperature, relativeHumidity).DegreesCelsius:0.#}\u00B0C");
 Debug.WriteLine($"Dew point: {WeatherHelper.CalculateDewPoint(temperature, relativeHumidity).DegreesCelsius:0.#}\u00B0C");
 Debug.WriteLine();
 }

 sensor.Sleep();

 Thread.Sleep(1000);
 }

}

Result

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.94 53 6/22/2026
2.0.0-preview.85 54 6/1/2026
2.0.0-preview.80 56 5/27/2026
2.0.0-preview.73 53 5/20/2026
2.0.0-preview.69 55 5/18/2026
2.0.0-preview.62 56 5/13/2026
2.0.0-preview.49 52 5/4/2026
2.0.0-preview.45 60 4/29/2026
2.0.0-preview.37 58 4/22/2026
2.0.0-preview.32 54 4/20/2026
2.0.0-preview.16 70 3/10/2026
1.2.991 101 6/22/2026
1.2.952 131 3/4/2026
1.2.907 299 10/2/2025
1.2.889 268 7/28/2025
1.2.869 376 4/2/2025
1.2.864 328 4/2/2025
1.2.852 357 3/11/2025
1.2.846 326 3/10/2025
1.2.822 298 2/26/2025
Loading failed