Meadow.Foundation.Sensors.Motion.Lsm303agr
1.3.2.4-beta
See the version list below for details.
dotnet add package Meadow.Foundation.Sensors.Motion.Lsm303agr --version 1.3.2.4-beta
NuGet\Install-Package Meadow.Foundation.Sensors.Motion.Lsm303agr -Version 1.3.2.4-beta
<PackageReference Include="Meadow.Foundation.Sensors.Motion.Lsm303agr" Version="1.3.2.4-beta" />
paket add Meadow.Foundation.Sensors.Motion.Lsm303agr --version 1.3.2.4-beta
#r "nuget: Meadow.Foundation.Sensors.Motion.Lsm303agr, 1.3.2.4-beta"
// Install Meadow.Foundation.Sensors.Motion.Lsm303agr as a Cake Addin
#addin nuget:?package=Meadow.Foundation.Sensors.Motion.Lsm303agr&version=1.3.2.4-beta&prerelease
// Install Meadow.Foundation.Sensors.Motion.Lsm303agr as a Cake Tool
#tool nuget:?package=Meadow.Foundation.Sensors.Motion.Lsm303agr&version=1.3.2.4-beta&prerelease
Meadow.Foundation.Sensors.Motion.Lsm303agr
Lsm303agr I2C 6-axis accelerometer and magnetometer
The Lsm303agr library is designed for the Wilderness Labs Meadow .NET IoT platform and is part of Meadow.Foundation
The Meadow.Foundation peripherals library is an open-source repository of drivers and libraries that streamline and simplify adding hardware to your C# .NET Meadow IoT application.
For more information on developing for Meadow, visit developer.wildernesslabs.co, to view all Wilderness Labs open-source projects, including samples, visit github.com/wildernesslabs
Usage
Lsm303agr sensor;
public override Task Initialize()
{
Resolver.Log.Info("Initialize hardware...");
sensor = new Lsm303agr(Device.CreateI2cBus());
// classical .NET events can also be used:
sensor.Updated += HandleResult;
// Example that uses an IObservable subscription to only be notified when the filter is satisfied
var consumer = Lsm303agr.CreateObserver(handler: result => HandleResult(this, result),
filter: result => FilterResult(result));
sensor.Subscribe(consumer);
sensor.StartUpdating(TimeSpan.FromMilliseconds(2000));
return base.Initialize();
}
bool FilterResult(IChangeResult<(Acceleration3D? Acceleration3D, MagneticField3D? MagneticField3D)> result)
{
return result.New.Acceleration3D.Value.Z > new Acceleration(0.1, Acceleration.UnitType.Gravity);
}
void HandleResult(object sender,
IChangeResult<(Acceleration3D? Acceleration3D,
MagneticField3D? MagneticField3D)> result)
{
var accel = result.New.Acceleration3D.Value;
var mag = result.New.MagneticField3D.Value;
Resolver.Log.Info($"AccelX={accel.X.Gravity:0.##}g, AccelY={accel.Y.Gravity:0.##}g, AccelZ={accel.Z.Gravity:0.##}g, MagX={mag.X.Gauss:0.##}gauss, MagY={mag.Y.Gauss:0.##}gauss, MagZ={mag.Z.Gauss:0.##}gauss");
}
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net5.0 was computed. net5.0-windows was computed. net6.0 was computed. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. |
.NET Core | netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
.NET Standard | netstandard2.1 is compatible. |
MonoAndroid | monoandroid was computed. |
MonoMac | monomac was computed. |
MonoTouch | monotouch was computed. |
Tizen | tizen60 was computed. |
Xamarin.iOS | xamarinios was computed. |
Xamarin.Mac | xamarinmac was computed. |
Xamarin.TVOS | xamarintvos was computed. |
Xamarin.WatchOS | xamarinwatchos was computed. |
-
.NETStandard 2.1
- Meadow.Foundation (>= 1.3.2.4-beta)
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.5.0 | 43 | 11/28/2023 |
1.4.0.9-beta | 36 | 11/28/2023 |
1.4.0.8-beta | 32 | 11/27/2023 |
1.4.0.7-beta | 50 | 11/8/2023 |
1.4.0.6-beta | 33 | 11/7/2023 |
1.4.0.4-beta | 64 | 11/1/2023 |
1.4.0.3 | 121 | 10/31/2023 |
1.3.4.10-beta | 57 | 10/25/2023 |
1.3.4.9-beta | 62 | 10/24/2023 |
1.3.4.8-beta | 64 | 10/17/2023 |
1.3.4.7-beta | 67 | 10/10/2023 |
1.3.4.6-beta | 65 | 10/5/2023 |
1.3.4.5-beta | 62 | 10/4/2023 |
1.3.4.4-beta | 63 | 10/3/2023 |
1.3.4.3-beta | 62 | 10/3/2023 |
1.3.4.2-beta | 63 | 9/30/2023 |
1.3.4.1-beta | 60 | 9/30/2023 |
1.3.4 | 120 | 9/26/2023 |
1.3.2.5-beta | 62 | 9/21/2023 |
1.3.2.4-beta | 61 | 9/20/2023 |
1.3.2.3-beta | 61 | 9/19/2023 |
1.3.2.2-beta | 58 | 9/15/2023 |
1.3.2.1-beta | 86 | 9/14/2023 |
1.3.2-beta | 80 | 9/13/2023 |
1.3.1.1-beta | 73 | 9/5/2023 |
1.3.0 | 171 | 8/29/2023 |
1.2.1.11-beta | 88 | 8/24/2023 |
1.2.1.9-beta | 112 | 8/17/2023 |
1.2.1.8-beta | 111 | 8/8/2023 |
1.2.1.6-beta | 104 | 8/4/2023 |
1.2.0 | 159 | 8/1/2023 |
1.1.1.11-beta | 130 | 7/24/2023 |
1.1.1.9-beta | 127 | 7/22/2023 |
1.1.1.8-beta | 110 | 7/21/2023 |
1.1.0 | 134 | 7/11/2023 |
1.0.2.1 | 118 | 6/3/2023 |
1.0.2 | 112 | 6/3/2023 |
1.0.0.1 | 115 | 5/30/2023 |
1.0.0 | 119 | 5/28/2023 |
0.99.0 | 123 | 5/28/2023 |
0.98.2-alpha | 121 | 5/27/2023 |
0.98.0 | 131 | 5/6/2023 |