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-10-05
Package Version: 1.0.0.0
mikroSDK Library: 1.0.0.0
Category: Magnetic
Downloaded: 1682 times
Not followed.
License: MIT license
Angle 5 Click is a compact add-on board that detects the absolute angular position of a permanent magnet, typically a diametrically magnetized cylinder on a rotating shaft.
Do you want to subscribe in order to receive notifications regarding "Angle 5 click" changes.
Do you want to unsubscribe in order to stop receiving notifications regarding "Angle 5 click" changes.
Do you want to report abuse regarding "Angle 5 click".
Library Description
The library contains a basic functions for using Angle 5 click.
Key functions:
uint16_t angle5_read_raw_angle ( void )
- Reads Raw Angle datafloat angle5_read_angle_deg ( void )
- Reads Angle data in degExamples description
The application is composed of three sections :
void application_task ( )
{
char demo_text[ 20 ];
char log_txt[ 2 ] = { 13, 0 };
float new_angle = 0;
mikrobus_logWrite( log_txt, _LOG_TEXT );
mikrobus_logWrite( " ", _LOG_TEXT );
mikrobus_logWrite( log_txt, _LOG_TEXT );
new_angle = angle5_read_angle_deg( );
FloatToStr( new_angle, demo_text );
mikrobus_logWrite( " Angle: ", _LOG_TEXT );
mikrobus_logWrite( demo_text, _LOG_TEXT );
Delay_ms( 100 );
}
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.