![]() |
VOOZH | about |
dotnet add package nanoFramework.Iot.Device.Adxl343 --version 1.0.693
NuGet\Install-Package nanoFramework.Iot.Device.Adxl343 -Version 1.0.693
<PackageReference Include="nanoFramework.Iot.Device.Adxl343" Version="1.0.693" />
<PackageVersion Include="nanoFramework.Iot.Device.Adxl343" Version="1.0.693" />Directory.Packages.props
<PackageReference Include="nanoFramework.Iot.Device.Adxl343" />Project file
paket add nanoFramework.Iot.Device.Adxl343 --version 1.0.693
#r "nuget: nanoFramework.Iot.Device.Adxl343, 1.0.693"
#:package nanoFramework.Iot.Device.Adxl343@1.0.693
#addin nuget:?package=nanoFramework.Iot.Device.Adxl343&version=1.0.693Install as a Cake Addin
#tool nuget:?package=nanoFramework.Iot.Device.Adxl343&version=1.0.693Install as a Cake Tool
ADXL343 is a small, thin, low power, 3-axis accelerometer with high resolution (13-bit) measurement at up to ±16g.
In English
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 net is compatible. |
This package is not used by any NuGet packages.
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 2.0.0-preview.85 | 51 | 6/1/2026 |
| 2.0.0-preview.80 | 55 | 5/27/2026 |
| 2.0.0-preview.73 | 54 | 5/20/2026 |
| 2.0.0-preview.69 | 57 | 5/18/2026 |
| 2.0.0-preview.62 | 59 | 5/13/2026 |
| 2.0.0-preview.49 | 57 | 5/4/2026 |
| 2.0.0-preview.45 | 55 | 4/29/2026 |
| 2.0.0-preview.32 | 58 | 4/20/2026 |
| 2.0.0-preview.16 | 75 | 3/10/2026 |
| 1.0.693 | 136 | 3/4/2026 |
| 1.0.672 | 294 | 11/10/2025 |
| 1.0.648 | 248 | 10/2/2025 |
| 1.0.630 | 241 | 7/28/2025 |
| 1.0.610 | 330 | 4/2/2025 |
| 1.0.605 | 317 | 4/2/2025 |
| 1.0.593 | 289 | 3/11/2025 |
| 1.0.587 | 334 | 3/10/2025 |
| 1.0.563 | 239 | 2/26/2025 |
| 1.0.516 | 248 | 2/4/2025 |
| 1.0.513 | 228 | 2/4/2025 |