compass6
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 Compass6 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 Compass6 Click driver.
compass6_cfg_setup
Config Object Initialization function. compass6_init
Initialization function. compass6_default_cfg
Click Default Configuration function. compass6_get_axes_data
Magnetic axes data reading. compass6_data_ready
Get data ready pin state. compass6_generic_read
Reading function. This example is a showcase the ability of the device
to read 3 axis data of magnetic raw value when data is ready.
The demo application is composed of two sections :
Initialization of communication modules (I2C, UART) and data
ready pin as input. Then reads identification data and checks if some of them have wrong value, and configures device for reading.
Checks Data ready pin and if asserted high it will read data of all
3 axes(x, y, z) and log data to Terminal and set delay of 500ms.
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.