gmrangle
2.0.0.0
|
The GMR Angle Click is a Click board™ that features the TLI5012B E1000, which is a pre-calibrated 360° angle sensor that detects the orientation of a magnetic field, made by Infineon. The GMR Angle click is ideal for angular position sensing in industrial and consumer applications such as electrical commutated motor (e.g. BLDC), fans or pumps.
We provide a library for the GmrAngle 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 GmrAngle Click driver.
void gmrangle_cfg_setup ( gmrangle_cfg_t *cfg );
GMRANGLE_RETVAL gmrangle_init ( gmrangle_t *ctx, gmrangle_cfg_t *cfg );
void gmrangle_default_cfg ( gmrangle_t *ctx );
uint16_t gmrangle_read_data ( gmrangle_t *ctx, uint8_t reg );
void gmrangle_write_data ( gmrangle_t *ctx, uint8_t reg, uint16_t tx_data );
float gmrangle_calculate_angle ( gmrangle_t *ctx );
This is an example which demonstrates the use of GMR Angle Click board.
The demo application is composed of two sections :
Initializes GPIO pins, SPI and LOG modules.
Display angle value in degrees. Results are being sent to the Usart Terminal where you can track their changes. All data logs write on USB uart changes for every 1 sec.
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.