nanoFramework.Iot.Device.Lps22Hb
1.0.71
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.Lps22Hb --version 1.0.71
NuGet\Install-Package nanoFramework.Iot.Device.Lps22Hb -Version 1.0.71
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.Lps22Hb" Version="1.0.71" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add nanoFramework.Iot.Device.Lps22Hb --version 1.0.71
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: nanoFramework.Iot.Device.Lps22Hb, 1.0.71"
#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.Lps22Hb as a Cake Addin #addin nuget:?package=nanoFramework.Iot.Device.Lps22Hb&version=1.0.71 // Install nanoFramework.Iot.Device.Lps22Hb as a Cake Tool #tool nuget:?package=nanoFramework.Iot.Device.Lps22Hb&version=1.0.71
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
LPS22HB - MEMS nano pressure sensor: 260-1260 hPa absolute digital output barometer
Some of the applications mentioned by the datasheet:
- Altimeters and barometers for portable devices
- GPS applications
- Weather station equipment
- Sport watches
Documentation
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.
using Iot.Device.Lps22Hb;
using System.Device.I2c;
using System.Diagnostics;
using System.Threading;
using Lps22Hb lps22HdDevice = new(CreateI2cDevice(), FifoMode.Bypass);
while (true)
{
var tempValue = lps22HdDevice.Temperature;
var pressure = lps22HdDevice.Pressure;
Debug.WriteLine($"Temperature: {tempValue.DegreesCelsius:F1}\u00B0C");
Debug.WriteLine($"Pressure: {pressure.Hectopascals:F1}hPa");
Thread.Sleep(1000);
}
I2cDevice CreateI2cDevice()
{
I2cConnectionSettings settings = new(1, Lps22Hb.DefaultI2cAddress);
return I2cDevice.Create(settings);
}
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.Buffers.Binary.BinaryPrimitives (>= 1.2.418)
- nanoFramework.System.Device.I2c (>= 1.1.16)
- nanoFramework.System.Device.Model (>= 1.2.418)
- UnitsNet.nanoFramework.Pressure (>= 5.50.0)
- UnitsNet.nanoFramework.Temperature (>= 5.50.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.276 | 87 | 2/4/2025 |
1.0.273 | 73 | 2/4/2025 |
1.0.256 | 76 | 1/31/2025 |
1.0.244 | 65 | 1/20/2025 |
1.0.238 | 63 | 1/13/2025 |
1.0.219 | 92 | 12/30/2024 |
1.0.205 | 96 | 12/18/2024 |
1.0.197 | 80 | 12/16/2024 |
1.0.174 | 102 | 10/23/2024 |
1.0.157 | 90 | 10/3/2024 |
1.0.140 | 119 | 9/6/2024 |
1.0.132 | 107 | 8/28/2024 |
1.0.114 | 118 | 8/9/2024 |
1.0.102 | 86 | 7/26/2024 |
1.0.91 | 103 | 7/17/2024 |
1.0.74 | 114 | 6/19/2024 |
1.0.71 | 105 | 6/14/2024 |
1.0.37 | 127 | 4/15/2024 |
1.0.15 | 127 | 3/22/2024 |
1.0.1 | 138 | 3/1/2024 |