Skip to content
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
31 lines (23 sloc) 755 Bytes

ADXL345 - Accelerometer

ADXL345 is a small, thin, low power, 3-axis accelerometer with high resolution (13-bit) measurement at up to ±16g.

Sensor Image


SpiConnectionSettings settings = new SpiConnectionSettings(0, 0)
    ClockFrequency = Adxl345.SpiClockFrequency,
    Mode = Adxl345.SpiMode

var device = SpiDevice.Create(settings);

// set gravity measurement range ±4G
using (Adxl345 sensor = new Adxl345(device, GravityRange.Range04))
    // read acceleration
    Vector3 data = sensor.Acceleration;

    //use sensor


In Chinese :

In English :

You can’t perform that action at this time.