nanoFramework.Iot.Device.Adxl343
1.0.630
Prefix Reserved
dotnet add package nanoFramework.Iot.Device.Adxl343 --version 1.0.630
NuGet\Install-Package nanoFramework.Iot.Device.Adxl343 -Version 1.0.630
<PackageReference Include="nanoFramework.Iot.Device.Adxl343" Version="1.0.630" />
<PackageVersion Include="nanoFramework.Iot.Device.Adxl343" Version="1.0.630" />
<PackageReference Include="nanoFramework.Iot.Device.Adxl343" />
paket add nanoFramework.Iot.Device.Adxl343 --version 1.0.630
#r "nuget: nanoFramework.Iot.Device.Adxl343, 1.0.630"
#:package nanoFramework.Iot.Device.Adxl343@1.0.630
#addin nuget:?package=nanoFramework.Iot.Device.Adxl343&version=1.0.630
#tool nuget:?package=nanoFramework.Iot.Device.Adxl343&version=1.0.630
ADXL343 - Accelerometer
ADXL343 is a small, thin, low power, 3-axis accelerometer with high resolution (13-bit) measurement at up to ±16g.
Documentation
In English
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.
Here is the basic usage:
var i2c = new(new I2cConnectionSettings(I2cBusId, I2cAddr));
Adxl343 sensor = new Adxl343(i2c, GravityRange.Range16);
Debug.WriteLine("Testing Vector...");
Vector3 v = new Vector3();
while (true)
{
if (sensor.TryGetAcceleration(ref v))
{
Debug.WriteLine("Get Vector Successful");
Debug.WriteLine($"X = 0x{v.X}, Y = 0x{v.Y}, Z = 0x{v.Z}");
}
Thread.Sleep(1000);
}
Also you'll find a lot of functions which will allow you to have a very detailed and precise way to setup the sensor.
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET Framework | net is compatible. |
-
- nanoFramework.CoreLibrary (>= 1.17.11)
- nanoFramework.Runtime.Events (>= 1.11.32)
- nanoFramework.System.Buffers.Binary.BinaryPrimitives (>= 1.2.862)
- nanoFramework.System.Device.I2c (>= 1.1.29)
- nanoFramework.System.Numerics (>= 1.2.862)
- UnitsNet.nanoFramework.Duration (>= 5.75.0)
- UnitsNet.nanoFramework.Mass (>= 5.75.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.630 | 92 | 7/28/2025 |
1.0.610 | 199 | 4/2/2025 |
1.0.605 | 190 | 4/2/2025 |
1.0.593 | 192 | 3/11/2025 |
1.0.587 | 198 | 3/10/2025 |
1.0.563 | 133 | 2/26/2025 |
1.0.516 | 141 | 2/4/2025 |
1.0.513 | 123 | 2/4/2025 |
1.0.500 | 133 | 1/31/2025 |
1.0.496 | 127 | 1/31/2025 |
1.0.484 | 130 | 1/20/2025 |
1.0.478 | 102 | 1/13/2025 |
1.0.459 | 131 | 12/30/2024 |
1.0.445 | 148 | 12/18/2024 |
1.0.437 | 133 | 12/16/2024 |
1.0.414 | 143 | 10/23/2024 |
1.0.397 | 163 | 10/3/2024 |
1.0.380 | 162 | 9/6/2024 |
1.0.372 | 152 | 8/28/2024 |
1.0.354 | 164 | 8/9/2024 |
1.0.342 | 119 | 7/26/2024 |
1.0.331 | 154 | 7/17/2024 |
1.0.314 | 157 | 6/19/2024 |
1.0.311 | 142 | 6/14/2024 |
1.0.289 | 135 | 5/15/2024 |
1.0.277 | 190 | 4/15/2024 |
1.0.255 | 172 | 3/22/2024 |
1.0.235 | 162 | 2/28/2024 |
1.0.215 | 184 | 1/24/2024 |
1.0.203 | 199 | 1/5/2024 |
1.0.199 | 195 | 12/20/2023 |
1.0.177 | 187 | 11/10/2023 |
1.0.157 | 162 | 11/8/2023 |
1.0.144 | 180 | 10/6/2023 |
1.0.137 | 158 | 9/27/2023 |
1.0.125 | 169 | 9/6/2023 |
1.0.119 | 230 | 8/16/2023 |
1.0.110 | 203 | 8/2/2023 |
1.0.104 | 198 | 7/28/2023 |
1.0.98 | 211 | 7/19/2023 |
1.0.95 | 185 | 7/14/2023 |
1.0.86 | 199 | 6/21/2023 |
1.0.82 | 207 | 6/14/2023 |
1.0.78 | 216 | 6/7/2023 |
1.0.76 | 197 | 6/2/2023 |
1.0.70 | 214 | 5/26/2023 |
1.0.54 | 213 | 5/12/2023 |
1.0.43 | 218 | 5/10/2023 |
1.0.38 | 205 | 5/3/2023 |
1.0.14 | 283 | 3/17/2023 |
1.0.8 | 295 | 3/10/2023 |
1.0.4 | 297 | 3/8/2023 |
1.0.1 | 316 | 2/27/2023 |
0.0.0 | 328 | 2/16/2023 |