Skip to content

mcci-catena/LIS2DUXS12

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

LIS2DUXS12

Arduino library to support the LIS2DUXS12 3D accelerometer

API

This sensor uses I2C to communicate. For I2C it is then required to create a TwoWire interface before accessing to the sensors:

TwoWire dev_i2c(I2C_SDA, I2C_SCL);  
dev_i2c.begin();

An instance can be created and enabled when the I2C bus is used following the procedure below:

LIS2DUXS12Sensor Accelero(&dev_i2c);
Accelero.begin();
Accelero.Enable_X();

The access to the sensor values is done as explained below:

Read accelerometer.

int32_t accelerometer[3];
Accelero.Get_X_Axes(accelerometer);  

Examples

  • LIS2DUXS12_Double_Tap_Detection: This application shows how to detect the double tap event using the LIS2DUXS12 accelerometer.

  • LIS2DUXS12_Single_Tap_Detection: This application shows how to detect the single tap event using the LIS2DUXS12 accelerometer.

  • LIS2DUXS12_Tilt_Detection: This application shows how to detect the tilt event using the LIS2DUXS12 accelerometer.

  • LIS2DUXS12_Wake_Up_Detection: This application shows how to detect the wake-up event using the LIS2DUXS12 accelerometer.

Documentation

You can find the source files at
https://github.com/stm32duino/LIS2DUXS12

The LIS2DUXS12 datasheet is available at
https://www.st.com/content/st_com/en/products/mems-and-sensors/accelerometers/LIS2DUXS12.html

About

Arduino library to support the LIS2DUXS12 3D ultralow-power accelerometer with QVAR and AI

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C 69.8%
  • C++ 30.2%