accel10
2.0.0.0
|
Accel 10 Click features an ultra-low power triaxial "femto" accelerometer sensor with embedded intelligence, labeled as the LIS2DW12TR. This Click board™ allows linear motion and gravitational force measurements in ranges of ±2 g, ±4 g, ±8, and ±16 g in three perpendicular axes.
We provide a library for the Accel10 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 Accel10 Click driver.
void accel10_cfg_setup ( accel10_cfg_t *cfg );
ACCEL10_RETVAL accel10_init ( accel10_t *ctx, accel10_cfg_t *cfg );
void accel10_default_cfg ( accel10_t *ctx );
uint8_t accel10_check_data_ready ( accel10_t *ctx );
void accel10_get_data ( accel10_t *ctx, accel10_data_t *p_accel_data );
int8_t accel10_read_temperature ( accel10_t *ctx );
This example demonstrates the use of Accel 10 Click board.
The demo application is composed of two sections :
Initializes the driver and checks the communication by reading the device ID. After that, performs the Click default configuration.
Reads the accel values for X, Y, and Z axis and also reads the temperature in Celsius and displays the results on the USB UART each second.
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.