magneticrotary2 2.0.0.0
|
Magnetic Rotary 2 Click is a compact add-on board used for accurate magnet-position sensing. This board features the AEAT-9922, an angular magnetic rotary sensor providing accurate angular measurement over a full 360 degrees of rotation from Broadcom Limited. The AEAT-9922 uses integrated Hall sensor elements with complex analog and digital signal processing within a single device. The absolute angle measurement provides an instant indication of the magnet's angular position with a selectable and one-time programmable resolution from 10 to 18 bits.
We provide a library for the MagneticRotary2 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 MagneticRotary2 Click driver.
magneticrotary2_cfg_setup
Config Object Initialization function. magneticrotary2_init
Initialization function. magneticrotary2_default_cfg
Click Default Configuration function. magneticrotary2_write_register
This function writes a data byte to the selected register by using SPI serial interface. magneticrotary2_read_register
This function reads a data byte from the selected register by using SPI serial interface. magneticrotary2_get_angle
This function reads the absolute position raw data and converts it to degrees (Angle). This example demonstrates the use of Magnetic Rotary 2 click board by reading and displaying the magnet's angular position in degrees.
The demo application is composed of two sections :
Initializes the driver and performs the click default configuration.
Reads the magnet's angular position in degrees every 100ms and displays the results on the USB UART.
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. The terminal available in all MikroElektronika compilers, or any other terminal application of your choice, can be used to read the message.