c3dhall6 2.0.0.0
|
3D Hall 6 Click is a very accurate, magnetic field sensing Click boardâ„¢, used to measure the intensity of the magnetic field across three perpendicular axes.
We provide a library for the 3dHall6 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 3dHall6 Click driver.
- Initialization function.void c3dhall6_cfg_setup ( c3dhall6_cfg_t *cfg );
C3DHALL6_RETVAL c3dhall6_init ( c3dhall6_t *ctx, c3dhall6_cfg_t *cfg );
void c3dhall6_default_cfg ( c3dhall6_t *ctx );
- This function reads ADC value on selected channel.void c3dhall6_set_reference_values ( c3dhall6_t *ctx, float reference_voltage, float ref_adc_ch0, float ref_adc_ch1, float ref_adc_ch2, float ref_adc_ch3 );
void c3dhall6_get_adc_value ( c3dhall6_t *ctx, uint8_t channel_no, uint16_t *adc_value );
void c3dhall6_get_volt( c3dhall6_t *ctx, uint8_t channel_no, float *channel_voltage );
This application measure the intensity of the magnetic field across three perpendicular axes.
The demo application is composed of two sections :
Initializes device.
Additional Functions :
- c3dhall6_log_adc_task() - performs and logs adc measurements on all channels
- c3dhall6_log_volt_task() - performs and logs voltage measurements on all channels
- c3dhall6_log_angleRad_task() - performs and logs angle measurements in radians on each die
- c3dhall6_log_angleDeg_task() - performs and logs angle measurements in degrees on each die
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.