nanoFramework.Iot.Device.Ahtxx 1.2.613
前缀已保留
dotnet add package nanoFramework.Iot.Device.Ahtxx --version 1.2.613
NuGet\Install-Package nanoFramework.Iot.Device.Ahtxx -Version 1.2.613
该命令旨在在 Visual Studio 的包管理器控制台中使用,因为它使用 NuGet 模块的 Install-Package 版本。
<PackageReference Include="nanoFramework.Iot.Device.Ahtxx" Version="1.2.613" />
对于支持 PackageReference 的项目,将此 XML 节点复制到项目文件中,以引用该包。
paket add nanoFramework.Iot.Device.Ahtxx --version 1.2.613
NuGet 团队不提供对该客户端的支持。请联系其 管理员 以获取支持。
#r "nuget: nanoFramework.Iot.Device.Ahtxx, 1.2.613"
#r 指令可以在 F# Interactive 和 Polyglot Notebooks 中使用。将其复制到交互式工具或脚本的源代码中,以引用包。
// Install nanoFramework.Iot.Device.Ahtxx as a Cake Addin #addin nuget:?package=nanoFramework.Iot.Device.Ahtxx&version=1.2.613 // Install nanoFramework.Iot.Device.Ahtxx as a Cake Tool #tool nuget:?package=nanoFramework.Iot.Device.Ahtxx&version=1.2.613
NuGet 团队不提供对该客户端的支持。请联系其 管理员 以获取支持。
AHT10/15/20 - 温度和湿度传感器模块
AHT10/15 和 AHT20 传感器是高精度、校准过的温度和相对湿度传感器模块,具有 I2C 数字接口。
文档
支持的设备
该绑定支持以下类型
功能
该绑定支持以下传感器功能
- 获取温度和相对湿度读数
- 读取状态
- 发出校准和重置命令
传感器类
您需要根据传感器类型选择类。
传感器 | 所需类 |
---|---|
AHT10 | Aht10 |
Aht15 | Aht10 |
Aht20 | Aht20 |
用法
重要:在创建 I2cDevice
之前,确保您已正确设置 I2C 引脚,特别是针对 ESP32,确保您已安装 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);
对于 STM32 等其他设备,请确保您正在使用您要使用的 I2C 总线的预设引脚。
该绑定使用现有的 I2cDevice
实例来实例化。AHT 传感器模块仅支持默认 I2C 地址。
设置AHT20传感器模块
const int I2cBus = 1;
I2cConnectionSettings i2cSettings = new I2cConnectionSettings(I2cBus, Aht20.DefaultI2cAddress);
I2cDevice i2cDevice = I2cDevice.Create(i2cSettings);
Aht20 sensor = new Aht20(i2cDevice);
温度和湿度数据通过以下方法获取:
public Temperature GetTemperature()
public Ratio GetHumidity()
请参考示例应用程序以获取完整示例。
连线方式
AHTxx传感器通过I2C接口(SDC/SDA)连接到MCU。传感器提供3.3V电源,以符合MCU的3.3V接口标准。
-
- nanoFramework.CoreLibrary (>= 1.15.5)
- nanoFramework.Runtime.Events (>= 1.11.18)
- nanoFramework.System.Device.Gpio (>= 1.1.41)
- nanoFramework.System.Device.I2c (>= 1.1.16)
- nanoFramework.System.Device.Model (>= 1.2.586)
- UnitsNet.nanoFramework.RelativeHumidity (>= 5.56.0)
- UnitsNet.nanoFramework.Temperature (>= 5.56.0)
NuGet包
此包未由任何NuGet包使用。
GitHub存储库
此包未由任何流行GitHub存储库使用。
版本 | 下载 | 最后更新 |
---|---|---|
1.2.613 | 55 | 8/9/2024 |
1.2.601 | 61 | 7/26/2024 |
1.2.590 | 61 | 7/17/2024 |
1.2.573 | 97 | 6/19/2024 |
1.2.570 | 84 | 6/14/2024 |
1.2.560 | 94 | 5/29/2024 |
1.2.548 | 94 | 5/15/2024 |
1.2.536 | 102 | 4/15/2024 |
1.2.514 | 93 | 3/22/2024 |
1.2.494 | 103 | 2/28/2024 |
1.2.474 | 122 | 1/24/2024 |
1.2.462 | 174 | 1/5/2024 |
1.2.458 | 119 | 12/20/2023 |
1.2.436 | 122 | 11/10/2023 |
1.2.416 | 94 | 11/8/2023 |
1.2.403 | 122 | 10/6/2023 |
1.2.396 | 110 | 9/27/2023 |
1.2.384 | 115 | 9/6/2023 |
1.2.378 | 125 | 8/16/2023 |
1.2.369 | 133 | 8/2/2023 |
1.2.363 | 139 | 7/28/2023 |
1.2.357 | 116 | 7/19/2023 |
1.2.354 | 134 | 7/14/2023 |
1.2.345 | 121 | 6/21/2023 |
1.2.341 | 119 | 6/14/2023 |
1.2.337 | 124 | 6/7/2023 |
1.2.335 | 126 | 6/2/2023 |
1.2.329 | 118 | 5/26/2023 |
1.2.313 | 130 | 5/12/2023 |
1.2.302 | 136 | 5/10/2023 |
1.2.297 | 137 | 5/3/2023 |
1.2.273 | 223 | 3/17/2023 |
1.2.267 | 211 | 3/10/2023 |
1.2.263 | 216 | 3/8/2023 |
1.2.259 | 231 | 2/27/2023 |
1.2.256 | 228 | 2/24/2023 |
1.2.253 | 237 | 2/22/2023 |
1.2.222 | 290 | 1/9/2023 |
1.2.217 | 306 | 1/6/2023 |
1.2.208 | 292 | 1/3/2023 |
1.2.203 | 273 | 12/28/2022 |
1.2.159 | 360 | 11/14/2022 |
1.2.153 | 373 | 11/5/2022 |
1.2.141 | 385 | 10/25/2022 |
1.2.122 | 439 | 10/12/2022 |
1.2.114 | 402 | 10/8/2022 |
1.2.95 | 413 | 9/22/2022 |
1.2.87 | 482 | 9/15/2022 |
1.2.73 | 412 | 9/8/2022 |
1.2.63 | 420 | 9/3/2022 |
1.2.47 | 429 | 8/15/2022 |
1.2.40 | 434 | 8/6/2022 |
1.2.38 | 428 | 8/5/2022 |
1.2.28 | 418 | 8/1/2022 |
1.2.13 | 447 | 7/24/2022 |
1.2.10 | 436 | 7/23/2022 |
1.1.145.58726 | 457 | 7/7/2022 |
1.1.133.52556 | 461 | 6/30/2022 |
1.1.121.35854 | 482 | 6/26/2022 |
1.1.116.8772 | 447 | 6/24/2022 |
1.1.113.2032 | 441 | 6/23/2022 |
1.1.102.51394 | 455 | 6/15/2022 |
1.1.99.36719 | 434 | 6/14/2022 |
1.1.72.29765 | 465 | 5/31/2022 |
1.1.64.21380 | 460 | 5/26/2022 |
1.1.58.10097 | 452 | 5/23/2022 |
1.1.54.28879 | 460 | 5/23/2022 |
1.1.40 | 458 | 5/5/2022 |
1.1.3 | 461 | 4/15/2022 |
1.1.1 | 465 | 4/14/2022 |
1.0.300 | 474 | 3/31/2022 |
1.0.288-preview.114 | 126 | 3/25/2022 |
1.0.288-preview.113 | 115 | 3/25/2022 |
1.0.288-preview.103 | 105 | 3/21/2022 |
1.0.288-preview.100 | 115 | 3/19/2022 |
1.0.288-preview.99 | 127 | 3/18/2022 |
1.0.288-preview.98 | 114 | 3/18/2022 |
1.0.288-preview.93 | 115 | 3/15/2022 |
1.0.288-preview.87 | 126 | 3/10/2022 |
1.0.288-preview.86 | 116 | 3/8/2022 |
1.0.288-preview.77 | 122 | 2/27/2022 |
1.0.288-preview.75 | 108 | 2/26/2022 |
1.0.288-preview.65 | 113 | 2/18/2022 |
1.0.288-preview.63 | 111 | 2/16/2022 |
1.0.288-preview.61 | 122 | 2/12/2022 |
1.0.288-preview.58 | 115 | 2/10/2022 |
1.0.288-preview.53 | 120 | 2/9/2022 |
1.0.288-preview.41 | 129 | 1/31/2022 |
1.0.288-preview.29 | 124 | 1/28/2022 |
1.0.288-preview.20 | 132 | 1/27/2022 |
1.0.288-preview.19 | 130 | 1/27/2022 |
1.0.288-preview.18 | 128 | 1/27/2022 |
1.0.288-preview.5 | 133 | 1/24/2022 |
1.0.288-preview.1 | 126 | 1/21/2022 |
1.0.272 | 164 | 1/10/2022 |
1.0.259 | 324 | 12/9/2021 |
1.0.258 | 314 | 12/7/2021 |
1.0.218 | 193 | 10/18/2021 |
1.0.157 | 340 | 9/4/2021 |
1.0.155 | 339 | 8/31/2021 |
1.0.153 | 334 | 8/14/2021 |
1.0.151 | 349 | 8/6/2021 |
1.0.146 | 339 | 7/22/2021 |
1.0.136 | 410 | 7/17/2021 |
1.0.135 | 154 | 7/16/2021 |
1.0.134 | 168 | 7/15/2021 |
1.0.133 | 185 | 7/14/2021 |
1.0.130 | 154 | 7/6/2021 |
1.0.129 | 159 | 7/6/2021 |
1.0.127 | 171 | 7/5/2021 |
1.0.125 | 191 | 7/5/2021 |
1.0.122 | 208 | 6/30/2021 |
1.0.121 | 193 | 6/29/2021 |
1.0.119 | 225 | 6/28/2021 |
1.0.105 | 167 | 5/29/2021 |
1.0.104 | 164 | 5/29/2021 |
1.0.22 | 210 | 5/21/2021 |