![]() |
VOOZH | about |
dotnet add package nanoFramework.Iot.Device.Shtc3 --version 1.2.952
NuGet\Install-Package nanoFramework.Iot.Device.Shtc3 -Version 1.2.952
<PackageReference Include="nanoFramework.Iot.Device.Shtc3" Version="1.2.952" />
<PackageVersion Include="nanoFramework.Iot.Device.Shtc3" Version="1.2.952" />Directory.Packages.props
<PackageReference Include="nanoFramework.Iot.Device.Shtc3" />Project file
paket add nanoFramework.Iot.Device.Shtc3 --version 1.2.952
#r "nuget: nanoFramework.Iot.Device.Shtc3, 1.2.952"
#:package nanoFramework.Iot.Device.Shtc3@1.2.952
#addin nuget:?package=nanoFramework.Iot.Device.Shtc3&version=1.2.952Install as a Cake Addin
#tool nuget:?package=nanoFramework.Iot.Device.Shtc3&version=1.2.952Install as a Cake Tool
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.
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);
}
}
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET Framework | net net is compatible. |
This package is not used by any NuGet packages.
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 | 52 | 5/27/2026 |
| 2.0.0-preview.73 | 52 | 5/20/2026 |
| 2.0.0-preview.69 | 54 | 5/18/2026 |
| 2.0.0-preview.62 | 55 | 5/13/2026 |
| 2.0.0-preview.49 | 51 | 5/4/2026 |
| 2.0.0-preview.45 | 59 | 4/29/2026 |
| 2.0.0-preview.37 | 56 | 4/22/2026 |
| 2.0.0-preview.32 | 53 | 4/20/2026 |
| 2.0.0-preview.16 | 69 | 3/10/2026 |
| 1.2.952 | 130 | 3/4/2026 |
| 1.2.907 | 298 | 10/2/2025 |
| 1.2.889 | 267 | 7/28/2025 |
| 1.2.869 | 375 | 4/2/2025 |
| 1.2.864 | 327 | 4/2/2025 |
| 1.2.852 | 356 | 3/11/2025 |
| 1.2.846 | 325 | 3/10/2025 |
| 1.2.822 | 297 | 2/26/2025 |
| 1.2.775 | 288 | 2/4/2025 |
| 1.2.772 | 266 | 2/4/2025 |