nanoFramework.Iot.Device.Lps25h
1.0.288-preview.99
Prefix Reserved
This is a prerelease version of nanoFramework.Iot.Device.Lps25h.
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.Lps25h --version 1.0.288-preview.99
NuGet\Install-Package nanoFramework.Iot.Device.Lps25h -Version 1.0.288-preview.99
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.Lps25h" Version="1.0.288-preview.99" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add nanoFramework.Iot.Device.Lps25h --version 1.0.288-preview.99
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: nanoFramework.Iot.Device.Lps25h, 1.0.288-preview.99"
#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.Lps25h as a Cake Addin #addin nuget:?package=nanoFramework.Iot.Device.Lps25h&version=1.0.288-preview.99&prerelease // Install nanoFramework.Iot.Device.Lps25h as a Cake Tool #tool nuget:?package=nanoFramework.Iot.Device.Lps25h&version=1.0.288-preview.99&prerelease
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
LPS25H - Piezoresistive pressure and thermometer sensor
Some of the applications mentioned by the datasheet:
- Altimeter and barometer for portable devices
- GPS applications
- Weather station equipment
- Sport watches
Documentation
- You can find the datasheet here
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.
class Program
{
// I2C address on SenseHat board
public const int I2cAddress = 0x5c;
static void Main(string[] args)
{
using (var th = new Lps25h(CreateI2cDevice()))
{
while (true)
{
var tempValue = th.Temperature;
var preValue = th.Pressure;
var altValue = WeatherHelper.CalculateAltitude(preValue, defaultSeaLevelPressure, tempValue);
Debug.WriteLine($"Temperature: {tempValue.Celsius:0.#}\u00B0C");
Debug.WriteLine($"Pressure: {preValue.Hectopascal:0.##}hPa");
Debug.WriteLine($"Altitude: {altValue:0.##}m");
Thread.Sleep(1000);
}
}
}
private static I2cDevice CreateI2cDevice()
{
var settings = new I2cConnectionSettings(1, I2cAddress);
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.12.0-preview.19)
- nanoFramework.System.Buffers.Binary.BinaryPrimitives (>= 1.0.288-preview.97)
- nanoFramework.System.Device.I2c (>= 1.0.3-preview.13)
- nanoFramework.System.Device.Model (>= 1.0.288-preview.97)
- nanoFramework.System.Diagnostics.Stopwatch (>= 1.0.289-preview.58)
- nanoFramework.System.Math (>= 1.4.4-preview.22)
- UnitsNet.nanoFramework.Pressure (>= 4.125.0)
- UnitsNet.nanoFramework.Temperature (>= 4.125.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.2.704 | 76 | 12/18/2024 |
1.2.696 | 79 | 12/16/2024 |
1.2.673 | 95 | 10/23/2024 |
1.2.662 | 96 | 10/11/2024 |
1.2.656 | 92 | 10/3/2024 |
1.2.639 | 127 | 9/6/2024 |
1.2.631 | 104 | 8/28/2024 |
1.2.613 | 124 | 8/9/2024 |
1.2.601 | 84 | 7/26/2024 |
1.2.590 | 99 | 7/17/2024 |
1.2.573 | 113 | 6/19/2024 |
1.2.570 | 105 | 6/14/2024 |
1.2.536 | 113 | 4/15/2024 |
1.2.514 | 127 | 3/22/2024 |
1.2.494 | 111 | 2/28/2024 |
1.2.474 | 132 | 1/24/2024 |
1.2.462 | 175 | 1/5/2024 |
1.2.458 | 139 | 12/20/2023 |
1.2.436 | 164 | 11/10/2023 |
1.2.416 | 112 | 11/8/2023 |
1.2.403 | 128 | 10/6/2023 |
1.2.396 | 133 | 9/27/2023 |
1.2.384 | 134 | 9/6/2023 |
1.2.378 | 152 | 8/16/2023 |
1.2.369 | 145 | 8/2/2023 |
1.2.363 | 153 | 7/28/2023 |
1.2.357 | 160 | 7/19/2023 |
1.2.354 | 152 | 7/14/2023 |
1.2.345 | 141 | 6/21/2023 |
1.2.341 | 145 | 6/14/2023 |
1.2.337 | 159 | 6/7/2023 |
1.2.335 | 141 | 6/2/2023 |
1.2.329 | 148 | 5/26/2023 |
1.2.313 | 170 | 5/12/2023 |
1.2.302 | 177 | 5/10/2023 |
1.2.297 | 162 | 5/3/2023 |
1.2.273 | 242 | 3/17/2023 |
1.2.267 | 265 | 3/10/2023 |
1.2.263 | 271 | 3/8/2023 |
1.2.259 | 264 | 2/27/2023 |
1.2.256 | 272 | 2/24/2023 |
1.2.253 | 257 | 2/22/2023 |
1.2.222 | 292 | 1/9/2023 |
1.2.217 | 317 | 1/6/2023 |
1.2.212 | 312 | 1/5/2023 |
1.2.208 | 320 | 1/3/2023 |
1.2.203 | 317 | 12/28/2022 |
1.2.159 | 371 | 11/14/2022 |
1.2.153 | 361 | 11/5/2022 |
1.2.141 | 403 | 10/25/2022 |
1.2.128 | 395 | 10/22/2022 |
1.2.87 | 496 | 9/15/2022 |
1.2.63 | 412 | 9/3/2022 |
1.2.47 | 458 | 8/15/2022 |
1.2.40 | 456 | 8/6/2022 |
1.2.38 | 428 | 8/5/2022 |
1.2.28 | 429 | 8/1/2022 |
1.2.13 | 452 | 7/24/2022 |
1.2.10 | 451 | 7/23/2022 |
1.1.142.3202 | 486 | 7/7/2022 |
1.1.133.52556 | 464 | 6/30/2022 |
1.1.121.35854 | 463 | 6/26/2022 |
1.1.116.8772 | 434 | 6/24/2022 |
1.1.113.2032 | 451 | 6/23/2022 |
1.1.102.51394 | 447 | 6/15/2022 |
1.1.99.36719 | 457 | 6/14/2022 |
1.1.97.17326 | 458 | 6/13/2022 |
1.1.92.53000 | 433 | 6/8/2022 |
1.1.72.29765 | 446 | 5/31/2022 |
1.1.64.21380 | 431 | 5/26/2022 |
1.1.54.28879 | 463 | 5/23/2022 |
1.1.40 | 457 | 5/5/2022 |
1.1.11 | 492 | 4/19/2022 |
1.1.3 | 459 | 4/15/2022 |
1.1.1 | 461 | 4/14/2022 |
1.0.300 | 459 | 3/31/2022 |
1.0.288-preview.114 | 135 | 3/25/2022 |
1.0.288-preview.113 | 118 | 3/25/2022 |
1.0.288-preview.104 | 115 | 3/22/2022 |
1.0.288-preview.103 | 110 | 3/21/2022 |
1.0.288-preview.100 | 127 | 3/19/2022 |
1.0.288-preview.99 | 133 | 3/18/2022 |
1.0.288-preview.98 | 125 | 3/18/2022 |
1.0.288-preview.94 | 130 | 3/15/2022 |
1.0.288-preview.93 | 125 | 3/15/2022 |
1.0.288-preview.87 | 123 | 3/10/2022 |
1.0.288-preview.86 | 127 | 3/8/2022 |
1.0.288-preview.77 | 131 | 2/27/2022 |
1.0.288-preview.75 | 120 | 2/26/2022 |
1.0.288-preview.65 | 124 | 2/18/2022 |
1.0.288-preview.63 | 129 | 2/16/2022 |
1.0.288-preview.61 | 127 | 2/12/2022 |
1.0.288-preview.58 | 126 | 2/10/2022 |
1.0.288-preview.53 | 115 | 2/9/2022 |
1.0.288-preview.48 | 145 | 2/4/2022 |
1.0.288-preview.41 | 139 | 1/31/2022 |
1.0.288-preview.29 | 140 | 1/28/2022 |
1.0.288-preview.20 | 148 | 1/27/2022 |
1.0.288-preview.18 | 138 | 1/27/2022 |
1.0.288-preview.5 | 137 | 1/24/2022 |
1.0.288-preview.1 | 138 | 1/21/2022 |
1.0.272 | 482 | 1/10/2022 |
1.0.259 | 336 | 12/9/2021 |
1.0.258 | 330 | 12/7/2021 |
1.0.153 | 355 | 8/14/2021 |
1.0.151 | 354 | 8/6/2021 |
1.0.146 | 323 | 7/22/2021 |
1.0.136 | 416 | 7/17/2021 |
1.0.135 | 178 | 7/16/2021 |
1.0.134 | 180 | 7/15/2021 |
1.0.133 | 203 | 7/14/2021 |
1.0.131 | 177 | 7/8/2021 |
1.0.130 | 199 | 7/6/2021 |
1.0.129 | 180 | 7/6/2021 |
1.0.127 | 190 | 7/5/2021 |
1.0.125 | 207 | 7/5/2021 |
1.0.122 | 219 | 6/30/2021 |
1.0.121 | 208 | 6/29/2021 |
1.0.119 | 233 | 6/28/2021 |
1.0.111 | 190 | 6/14/2021 |
1.0.104 | 267 | 5/29/2021 |
1.0.97 | 183 | 5/28/2021 |
1.0.51 | 182 | 5/24/2021 |