c3dhall
2.0.0.0
|
3D Hall Click carries the MLX90333 Triaxis Hall sensor, capable of detecting the position of any magnet in nearby space. It does so by being sensitive to three components of flux density (BX, BY, BZ)
We provide a library for the c3DHall 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 c3DHall Click driver.
void c3dhall_cfg_setup ( c3dhall_cfg_t *cfg );
C3DHALL_RETVAL c3dhall_init ( c3dhall_t *ctx, c3dhall_cfg_t *cfg );
void c3dhall_read_all_data ( c3dhall_t *ctx, c3dhall_all_data_t *all_data );
uint8_t c3dhall_calculate_angle ( c3dhall_t *ctx, uint16_t data_angle );
This application use to determine angle position.
The demo application is composed of two sections :
Initialization driver enable's - SPI and start write log.
This is a example which demonstrates the use of 3D Hall Click board. 3D Hall Click communicates with register via SPI by read data from register and calculate Alpha and Beta angle position. Results are being sent to the Usart Terminal where you can track their changes. All data logs on usb uart.
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.