ADXL362: Three Axis Accelerometer¶
This sample application demonstrates how to use the ADXL362 with data ready and threshold triggers. The upper and lower threshold triggers are configured in link mode with referenced detection. See the ADXL362 Datasheet for additional details.
Building and Running¶
This sample requires an ADXL362 sensor. It should work with any platform featuring a I2C peripheral interface. It does not work on QEMU.
# On Linux/macOS cd $ZEPHYR_BASE/samples/sensors/adxl362 mkdir build && cd build # On Windows cd %ZEPHYR_BASE%\samples\sensors\adxl362 mkdir build & cd build cmake -GNinja -DBOARD=<board to use> .. ninja ninja flash
The application will print acceleration values to the console at the default
sampling rate of 12.5 Hz. Shake the board continuously to trigger an upper
threshold event. Stop shaking the board to trigger a lower threshold event. In
Threshold trigger will be printed to the console.
x: -0.1, y: -0.0, z: 16.0 (m/s^2) x: -1.0, y: 7.0, z: 21.0 (m/s^2) Threshold trigger x: -3.1, y: 4.0, z: 0.0 (m/s^2) x: 1.1, y: 4.0, z: 15.1 (m/s^2)