accel13
2.0.0.0
|
Accel 13 Click features an ultra-low power triaxial accelerometer sensor with embedded intelligence, labeled as the IIS2DLPC.
We provide a library for the Accel13 Click as well as a demo application (example), developed using MikroElektronika compilers. The demo can run on all the main MikroElektronika development boards.
Package can be downloaded/installed directly form compilers IDE(recommended way), or downloaded from our LibStock, or found on mikroE github account.
This library contains API for Accel13 Click driver.
void accel13_cfg_setup ( accel13_cfg_t *cfg );
ACCEL13_RETVAL accel13_init ( accel13_t *ctx, accel13_cfg_t *cfg );
void accel13_default_cfg ( accel13_t *ctx );
void accel13_get_status ( accel13_t *ctx, accel13_status_t *status);
void accel13_get_tap_status ( accel13_t *ctx, accel13_tap_t *tap_status );
void accel13_get_6d_status ( accel13_t *ctx, accel13_6d_t *sixd_status );
This application enables reading acceleration and tapping data on all 3 axes, using I2C or SPI communication.
The demo application is composed of two sections :
Initializes driver init, Test communication, starts chip configuration for measurement and Temperature reads.
Reads Accelerometer data and detects tap on the axis
The example is the basic functionality of the IIS2DLPC sensor, it is possible to read the acceleration data and detect Tap on all 3 axes. For other settings and improvements in reading accuracy, you need to further set up the registers and set the sensor to your conditions.
The full application code, and ready to use projects can be installed directly form compilers IDE(recommneded) or found on LibStock page or mikroE GitHub accaunt.
Other mikroE Libraries used in the example:
Additional notes and informations
Depending on the development board you are using, you may need USB UART Click, USB UART 2 Click or RS232 Click to connect to your PC, for development systems with no UART to USB interface available on the board. The terminal available in all Mikroelektronika compilers, or any other terminal application of your choice, can be used to read the message.