nanoFramework.Iot.Device.Sht4x
1.0.1
Prefix Reserved
There is a newer version of this package available.
See the version list below for details.
See the version list below for details.
dotnet add package nanoFramework.Iot.Device.Sht4x --version 1.0.1
NuGet\Install-Package nanoFramework.Iot.Device.Sht4x -Version 1.0.1
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.1" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add nanoFramework.Iot.Device.Sht4x --version 1.0.1
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: nanoFramework.Iot.Device.Sht4x, 1.0.1"
#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.
// Install nanoFramework.Iot.Device.Sht4x as a Cake Addin #addin nuget:?package=nanoFramework.Iot.Device.Sht4x&version=1.0.1 // Install nanoFramework.Iot.Device.Sht4x as a Cake Tool #tool nuget:?package=nanoFramework.Iot.Device.Sht4x&version=1.0.1
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
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");
}
Product | Versions 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.
-
- nanoFramework.CoreLibrary (>= 1.15.5)
- nanoFramework.System.Device.I2c (>= 1.1.16)
- UnitsNet.nanoFramework.RelativeHumidity (>= 5.52.0)
- UnitsNet.nanoFramework.Temperature (>= 5.52.0)
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.199 | 91 | 2/4/2025 |
1.0.196 | 70 | 2/4/2025 |
1.0.179 | 72 | 1/31/2025 |
1.0.167 | 89 | 1/20/2025 |
1.0.161 | 74 | 1/13/2025 |
1.0.142 | 95 | 12/30/2024 |
1.0.120 | 100 | 12/16/2024 |
1.0.97 | 120 | 10/23/2024 |
1.0.80 | 102 | 10/3/2024 |
1.0.63 | 129 | 9/6/2024 |
1.0.55 | 130 | 8/28/2024 |
1.0.37 | 124 | 8/9/2024 |
1.0.25 | 106 | 7/26/2024 |
1.0.1 | 176 | 6/26/2024 |