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-04-24
Package Version: 1.0.0.0
mikroSDK Library: 1.0.0.0
Category: Magnetic
Downloaded: 3783 times
Not followed.
License: MIT license
Magneto 4 click is a high-resolution magnetic encoder Click board which allows contactless movement sensing down to 0.5µm. It features the AS5311, the complete integrated solution with Hall elements, low-noise analog front-end, and digital signal processing (DSP) sections, on the same die.
Do you want to subscribe in order to receive notifications regarding "MAGNETO 4 click" changes.
Do you want to unsubscribe in order to stop receiving notifications regarding "MAGNETO 4 click" changes.
Do you want to report abuse regarding "MAGNETO 4 click".
Library Description
The library contains functions for reading the magnetic field strength in order to detect the magnetic strip. The user has the functions available for reading the linear position of the sensor on the magnetic tape, and functions that return full information about the state of the magnetic field and encoder, for example the direction of the movement , the number of steps ...
Key functions:
int32_t magneto4_getEncoderPosition()
- Encoder position.uint16_t magneto4_getMagneticField()
- Magnetic field strength.void magneto4_setStartPosition(int32_t encoderPos)
- Set start encoder position.Examples description
The application is composed of the three sections :
void applicationTask()
{
encoderPosition = magneto4_getEncoderPosition();
if(oldPosition != encoderPosition)
{
IntToStr(encoderPosition, demoBuffer);
mikrobus_logWrite(" Encoder position : ", _LOG_TEXT);
mikrobus_logWrite(demoBuffer, _LOG_LINE);
mikrobus_logWrite("------------------------", _LOG_LINE);
}
oldPosition = encoderPosition;
}
Other mikroE Libraries used in the example:
SPI
UART
GPIO
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.