accel18
2.0.0.0
|
<PRVIH_PAR_RECENICA_SA_PRODUCT_PAGE_DA_ISPRATE_CELINU>
[click Product page](<CLICK_PRODUCT_PAGE_LINK>)
We provide a library for the Accel18 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 from NECTO Studio Package Manager(recommended way), downloaded from our LibStock™ or found on Mikroe github account.
This library contains API for Accel18 Click driver.
accel18_cfg_setup
Config Object Initialization function. accel18_init
Initialization function. accel18_default_cfg
Click Default Configuration function. accel18_read_axes
Accel data reading. accel18_set_range
Set range configuration. accel18_get_interrupt_1
Get interrupt 1 pin state. This example application showcases ability of the device
to read axes values on detected interrupt, and check detected motion.
The demo application is composed of two sections :
Initialization of comunication modules(SPI/I2C, UART) and additional
two interrupt pins. Then configures device and sets 8g range and 25 data rate, with interrupt enabled.
Whenever interrupt is detected checks interrupt status for motion
detection, and then reads x, y, and z axes, calculates value and logs result.
The full application code, and ready to use projects can be installed directly from NECTO Studio Package Manager(recommended way), downloaded from our LibStock™ or found on Mikroe github account.
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. UART terminal is available in all MikroElektronika compilers.