accel6
2.0.0.0
|
Accel 6 click is a three-axis acceleration sensor with many features. It uses the BMA280, a 14bit triaxial acceleration sensor with intelligent on-chip motion triggered interrupt controller, from Bosch Sensortec.
We provide a library for the Accel6 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 Accel6 Click driver.
void accel6_cfg_setup ( accel6_cfg_t *cfg );
ACCEL6_RETVAL accel6_init ( accel6_t *ctx, accel6_cfg_t *cfg );
void accel6_default_cfg ( accel6_t *ctx, uint8_t range_data, uint8_t bw_data, uint8_t lpw_data );
void accel6_data_offset ( accel6_t *ctx, uint8_t set_offset, float *offset_data );
void accel6_get_orient ( accel6_t *ctx, uint8_t *z_orient, uint8_t *xy_orient );
float accel6_get_axis ( accel6_t *ctx, uint8_t axis );
This application allows acceleration measurement in three perpendicular axes.
The demo application is composed of two sections :
Initializes Driver init and settings accelerometer data range, bandwidth, mode and sleep timer which are necessary for the init chip.
Reads the accel X / Y / Z axis data in mg, Temperature data in C, detects the orientation of the X,Y and Z axis and checking on which axis the tap is detected. All data logs on usb uart for every 500 ms.
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.