magneto7
2.0.0.0
|
Magneto 7 Click is a high-resolution magnetic sensor Click boardâ„¢ which allows contactless orientation sensing.
We provide a library for the Magneto7 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 Magneto7 Click driver.
void magneto7_cfg_setup ( magneto7_cfg_t *cfg );
MAGNETO7_RETVAL magneto7_init ( magneto7_t *ctx, magneto7_cfg_t *cfg );
void magneto7_default_cfg ( magneto7_t *ctx );
uint8_t magneto7_int_get ( magneto7_t *ctx );
uint8_t magneto7_get_register ( magneto7_t *ctx, uint8_t register_address, uint8_t * data_buffer, uint8_t n_data );
void magneto7_get_temperature ( magneto7_t *ctx, uint16_t *device_temperature );
This demo application reads position of a magnet above the sensor.
The demo application is composed of two sections :
Initializes device.
Waits for INT pin to go LOW, gets raw data, converts it to uT and logs results.
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.