compass5
2.0.0.0
|
Compass 5 Click is a compact add-on board that contains a 3-axis magnetometer device suitable for compass application. This board features the AK09918C, a 3-axis electronic compass with high sensitive Hall sensor technology from AKM Semiconductor.
We provide a library for the Compass5 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 Compass5 Click driver.
compass5_cfg_setup
Config Object Initialization function. compass5_init
Initialization function. compass5_write_byte
This function writes a desired number of data bytes starting from the selected register by using I2C serial interface. compass5_read_byte
This function read 1 byte. compass5_sw_reset
This function for software reset. This is an example that demonstrates the use of Compass 5 Click board that reads data
from magnetic sensors for X, Y, and Z axes,processes it and displays it via the UART terminal.
The demo application is composed of two sections :
Initializes I2C and starts to write log, performs power down mode, sets continuous measurement mode; also write log.
When Compass 5 click is connected to a mikroBUS, this example collects data on the current position of the X,
Y and Z axes via I2C communication, processes and displays the data via the UART terminal. All axis data is printed every 2 seconds.
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.