Any Framework
Iot.Device.Sht4x assembly for .NET nanoFramework C# projects
Published
Jun 22, 2026
3mo ago
Total Downloads
6.2K
6,178
Install
dotnet add package nanoFramework.Iot.Device.Sht4x --version 1.0.415
No framework information available.
README
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
- SHT4X datasheet
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");
}
Changes from Previous Version
No structural changes between v1.0.376 and v1.0.415.
Adoption Assessment
A verified publisher signal is available. Assess fit from the package's supported frameworks, license and dependency graph rather than popularity alone.
No SPDX license expression is published. Review the license text and your organisation's policy before redistribution.No target framework metadata is available. Confirm compatibility in a representative project before standardising on this package.
Related Guides & Workflows
Learn how to evaluate, integrate, or audit this package in your .NET project.