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: 2019-07-04
Package Version: 1.0.0.0
mikroSDK Library: 1.0.0.0
Category: Magnetic
Downloaded: 2992 times
Not followed.
License: MIT license
Magneto 7 Click is a high-resolution magnetic sensor Click board which allows contactless orientation sensing.
Do you want to subscribe in order to receive notifications regarding "Magneto 7 click" changes.
Do you want to unsubscribe in order to stop receiving notifications regarding "Magneto 7 click" changes.
Do you want to report abuse regarding "Magneto 7 click".
Library Description
Library contains functions for getting temperature and humidity. Library contains functions for getting and setting user register. Library contains functions for changing resolution and soft reset. Library contains functions for enabling/disabling heater and OTP.
Key functions:
uint8_t magneto7_intGet( void )
- returns INT pin state.void magneto7_get_data( int16_t * x_axis, int16_t * y_axis, int16_t * z_axis )
- gets data register values and sorts thair content into signed 16bit values.float magneto7_convert_to_uT( int16_t raw_data, uint8_t sensor_resolution )
- converts raw data by dividing raw data with 6 or 24 for 12bit or 14bit data.Examples description
The application is composed of three sections :
void applicationTask( )
{
int_status = magneto7_intGet( );
if (int_status == 0)
{
magneto7_get_data( &data_x, &data_y, &data_z );
converted_data = magneto7_convert_to_uT( data_x, _MAGNETO7_SENSOR_RES_14_BIT );
FloatToStr( converted_data, text );
magneto7_floatCut( );
mikrobus_logWrite( "> X Axis : ", _LOG_TEXT );
mikrobus_logWrite( text, _LOG_TEXT );
mikrobus_logWrite( " [uT]", _LOG_LINE );
converted_data = magneto7_convert_to_uT( data_y, _MAGNETO7_SENSOR_RES_14_BIT );
FloatToStr( converted_data, text );
magneto7_floatCut( );
mikrobus_logWrite( "> Y Axis : ", _LOG_TEXT );
mikrobus_logWrite( text, _LOG_TEXT );
mikrobus_logWrite( " [uT]", _LOG_LINE );
converted_data = magneto7_convert_to_uT( data_z, _MAGNETO7_SENSOR_RES_14_BIT );
FloatToStr( converted_data, text );
magneto7_floatCut( );
mikrobus_logWrite( "> Z Axis : ", _LOG_TEXT );
mikrobus_logWrite( text, _LOG_TEXT );
mikrobus_logWrite( " [uT]", _LOG_LINE );
mikrobus_logWrite( " ", _LOG_LINE );
Delay_ms(300);
}
}
Additional Functions :
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.