accel12 2.0.0.0
|
Accel 12 click is an advanced 3-axis motion tracking Click boardâ„¢, which utilizes the MC3216, a low-noise, and low power 3-axis accelerometer.
We provide a library for the Accel12 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 Accel12 Click driver.
- Initialization function.void accel12_cfg_setup ( accel12_cfg_t *cfg );
ACCEL12_RETVAL accel12_init ( accel12_t *ctx, accel12_cfg_t *cfg );
void accel12_default_cfg ( accel12_t *ctx );
- Functions for read one Accel axis datavoid accel12_configuration ( accel12_t *ctx, uint8_t reg, uint8_t data_in );
int16_t accel12_get_one_axis ( accel12_t *ctx, uint8_t axis );
void accel12_get_axis_data ( accel12_t *ctx, int16_t *x_axis, int16_t *y_axis, int16_t *z_axis);
This application allows acceleration measurement in three perpendicular axes.
The demo application is composed of two sections :
Initialization driver init and configuration Accel measuremen and Tap detection interrupt
Reads the acceleration data in 3 axis and detects the tap on the axes. All data logs on the USBUART every 1.5sec.
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.