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-08-12
Package Version: 1.0.0.0
mikroSDK Library: 1.0.0.0
Category: Magnetic
Downloaded: 1938 times
Not followed.
License: MIT license
Magneto 8 Click is a compact add-on board that contains an easy-to-program magnetic rotary position sensor with incremental quadrature (A/B) and 12-bit digital outputs. This board features the AS5601, 12-bit programmable contactless encoder IC from AMS-AG.
Do you want to subscribe in order to receive notifications regarding "Magneto 8 click" changes.
Do you want to unsubscribe in order to stop receiving notifications regarding "Magneto 8 click" changes.
Do you want to report abuse regarding "Magneto 8 click".
Library Description
The library contains basic functions to perform the control of the Magneto 8 click board.
Key functions:
uint16_t magneto8_get_angle_data ( void )
- Gets Angle datauint16_t magneto8_get_magnitude ( void )
- Gets magnitude datauint8_t magneto8_get_status ( void )
- Gets status dataExamples description
The application is composed of three sections :
void application_task ( )
{
uint16_t angle;
uint16_t mag;
char demo_text[ 20 ];
mag = magneto8_get_magnitude( );
IntToStr( mag, demo_text );
mikrobus_logWrite( "Magnetic: ", _LOG_TEXT );
mikrobus_logWrite( demo_text, _LOG_LINE );
angle = magneto8_get_angle_data( );
IntToStr( angle, demo_text );
mikrobus_logWrite( "Angle : ", _LOG_TEXT );
mikrobus_logWrite( demo_text, _LOG_LINE );
mikrobus_logWrite( "----------------------", _LOG_LINE );
Delay_ms( 2000 );
}
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.