nanoFramework.Iot.Device.Sht4x 1.0.313

Prefix Reserved
dotnet add package nanoFramework.Iot.Device.Sht4x --version 1.0.313
                    
NuGet\Install-Package nanoFramework.Iot.Device.Sht4x -Version 1.0.313
                    
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.Sht4x" Version="1.0.313" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="nanoFramework.Iot.Device.Sht4x" Version="1.0.313" />
                    
Directory.Packages.props
<PackageReference Include="nanoFramework.Iot.Device.Sht4x" />
                    
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.Sht4x --version 1.0.313
                    
#r "nuget: nanoFramework.Iot.Device.Sht4x, 1.0.313"
                    
#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.Sht4x@1.0.313
                    
#: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.Sht4x&version=1.0.313
                    
Install as a Cake Addin
#tool nuget:?package=nanoFramework.Iot.Device.Sht4x&version=1.0.313
                    
Install as a Cake Tool

Sht4x/SHT40/SHT41/SHT45 - Temperature & Humidity Sensor with internal heater

Sht4x is the next generation of Sensirion's temperature and humidity sensors. This project supports SHT40, SHT41, SHT43 and SHT45.

Documentation

Usage

Hardware Required

  • Sht4x
  • Male/Female Jumper Wires

Circuit

  • SCL - SCL
  • SDA - SDA
  • VCC - 5V
  • 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, (byte)I2cAddress.AddrLow);
I2cDevice device = I2cDevice.Create(settings);

using Sht4X sensor = new(device);
var data = sensor.ReadData(MeasurementMode.NoHeaterHighPrecision);
Debug.WriteLine($"Temperature: {data.Temperature.DegreesCelsius:0.#}\u00B0C");
Debug.WriteLine($"Relative humidity: {data.RelativeHumidity.Percent:0.#}%RH");
}
Product Compatible and additional computed target framework versions.
.NET Framework 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
1.0.313 90 7/28/2025
1.0.293 183 4/2/2025
1.0.288 199 4/2/2025
1.0.276 227 3/11/2025
1.0.270 192 3/10/2025
1.0.246 143 2/26/2025
1.0.199 149 2/4/2025
1.0.196 121 2/4/2025
1.0.179 120 1/31/2025
1.0.167 147 1/20/2025
1.0.161 113 1/13/2025
1.0.142 123 12/30/2024
1.0.120 134 12/16/2024
1.0.97 150 10/23/2024
1.0.80 127 10/3/2024
1.0.63 156 9/6/2024
1.0.55 156 8/28/2024
1.0.37 161 8/9/2024
1.0.25 130 7/26/2024
1.0.1 198 6/26/2024