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: 2018-12-14
Package Version: 1.0.0.0
mikroSDK Library: 1.0.0.0
Category: Magnetic
Downloaded: 4146 times
Not followed.
License: MIT license
Magnetic linear click is the very accurate position sensing Click board which utilizes the HMC1501, a linear magnetic displacement sensor IC.
Do you want to subscribe in order to receive notifications regarding "Magnetic linear click" changes.
Do you want to unsubscribe in order to stop receiving notifications regarding "Magnetic linear click" changes.
Do you want to report abuse regarding "Magnetic linear click".
Library Description
TThe library contains a function for reading the linear position of the magnet.
Key functions:
uint16_t magneticlinear_readData()
- Functions reads Magnetics Linear dataExamples description
The application is composed of the three sections :
void applicationTask()
{
uint16_t magneticData;
char demoText[ 50 ];
magneticData = magneticlinear_readData();
IntToStr(magneticData, demoText);
mikrobus_logWrite(" Magnetic Linear data : ", _LOG_TEXT);
mikrobus_logWrite(demoText, _LOG_LINE);
mikrobus_logWrite("________________", _LOG_LINE);
Delay_ms( 200 );
}
Other mikroE Libraries used in the example:
GPIO
Additional notes and information
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.