We strongly encourage users to use Package manager for sharing their code on Libstock website, because it boosts your efficiency and leaves the end user with no room for error. [more info]
Rating:
Author: MIKROE
Last Updated: 2020-06-16
Package Version: 1.0.0.0
Category: Magnetic
Downloaded: 165 times
Not followed.
License: MIT license
Magneto 6 Click features low power three dimensional Hall effect sensor, TLI493D-A2B6, designed for magnetic sensing applications. It measures the magnetic field in X, Y, and Z direction. Each X, Y and Z Hall probe is connected sequentially to a multiplexer, which is then connected to an Analog to Digital Converter (ADC).
Do you want to subscribe in order to receive notifications regarding "Magnetic 6 click" changes.
Do you want to unsubscribe in order to stop receiving notifications regarding "Magnetic 6 click" changes.
Do you want to report abuse regarding "Magnetic 6 click".
DOWNLOAD LINK | RELATED COMPILER | CONTAINS |
---|---|---|
1588846772_magnetic_6_click_mikroc_dspic.zip [130.96KB] | mikroC PRO for dsPIC30/33 & PIC24 |
|
1588846810_magnetic_6_click_mikroc_pic.zip [165.91KB] | mikroC PRO for PIC |
|
1588846827_magnetic_6_click_mikroc_pic32.zip [265.47KB] | mikroC PRO for PIC32 |
|
Library Description
Library provides functions for reading and writing data via I2C module. There are additial functions for reading device ID, device type and hardware version of the device. Library has functions for reading data from sensor data values, temperature data and magnetic data.
Key functions:
void magneto6_generic_write ( uint8_t reg_adr, uint8_t trigger, uint8_t tx_data )
- Function for writing byte data to device.int16_t magneto6_get_temp_value ( void )
- Function for reading temperature value from device and converting it to degrees Celsius.void magneto6_get_axes_value ( magneto6_axes_t *axes )
- Function for reading magnetic data from device for all three axes.Examples description
The application is composed of three sections :
void app_task ( void )
{
if ( TEMPERATURE == demo_type )
{
sens_data = magneto6_get_temp_value( );
IntToStr( sens_data, demo_txt );
Ltrim( demo_txt );
log_text( " Temperature: " );
log_line( demo_txt );
}
else
{
magneto6_get_axes_value( &axes_val );
IntToStr( axes_val.x, demo_txt );
Ltrim( demo_txt );
log_text( " X: " );
log_line( demo_txt );
IntToStr( axes_val.y, demo_txt );
Ltrim( demo_txt );
log_text( " Y: " );
log_line( demo_txt );
IntToStr( axes_val.z, demo_txt );
Ltrim( demo_txt );
log_text( " Z: " );
log_line( demo_txt );
}
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.