VOOZH about

URL: https://www.nuget.org/packages/nanoFramework.Iot.Device.Ahtxx/

⇱ NuGet Gallery | nanoFramework.Iot.Device.Ahtxx 1.2.952




👁 Image
nanoFramework.Iot.Device.Ahtxx 1.2.952

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

AHT10/15/20 - Temperature and humidity sensor modules

The AHT10/15 and AHT20 sensors are high-precision, calibrated temperature and relative humidity sensor modules with an I2C digital interface.

Documentation

Supported Devices

The binding supports the following types:

Functions

The binding supports the following sensor functions:

  • acquiring the temperature and relative humidty readings
  • reading status
  • issueing calibration and reset commands

Sensor classes

You need to choose the class depending on the sensor type.

Sensor Required class
AHT10 Aht10
Aht15 Aht10
Aht20 Aht20

Usage

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.

The binding gets instantiated using an existing I2cDevice instance. The AHT-sensor modules support only the default I2C address.

Setup for an AHT20 sensor module:

const int I2cBus = 1;
I2cConnectionSettings i2cSettings = new I2cConnectionSettings(I2cBus, Aht20.DefaultI2cAddress);
I2cDevice i2cDevice = I2cDevice.Create(i2cSettings);
Aht20 sensor = new Aht20(i2cDevice);

The temperature and humidity readings are acquired by using the following methods:

public Temperature GetTemperature()
public Ratio GetHumidity()

Refer to the sample application for a complete example.

Wiring

The AHTxx sensor is wired to the I2C interface (SDC/SDA) of the MCU. The sensor is supplied with 3.3V to comply with the 3.3V interface level of the MCU.

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.85 53 6/1/2026
2.0.0-preview.80 60 5/27/2026
2.0.0-preview.73 55 5/20/2026
2.0.0-preview.62 55 5/13/2026
2.0.0-preview.49 50 5/4/2026
2.0.0-preview.45 56 4/29/2026
2.0.0-preview.32 61 4/20/2026
2.0.0-preview.16 69 3/10/2026
1.2.952 137 3/4/2026
1.2.931 327 11/10/2025
1.2.907 260 10/2/2025
1.2.889 268 7/28/2025
1.2.869 372 4/2/2025
1.2.864 328 4/2/2025
1.2.852 343 3/11/2025
1.2.846 351 3/10/2025
1.2.822 283 2/26/2025
1.2.775 320 2/4/2025
1.2.772 263 2/4/2025
1.2.759 246 1/31/2025
Loading failed