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-08-17
Package Version: 1.0.0.0
mikroSDK Library: 1.0.0.0
Category: Magnetic
Downloaded: 3898 times
Not followed.
License: MIT license
Angle 4 click is an angular magnetic rotary sensor, which can be used as a rotary encoder. With the help of the AEAT-8800-Q24, an integrated 10 to 16-bit programmable angular magnetic encoder, the Angle 4 click can sense the magnetic field rotation aligned with the center of the sensor, over the whole range of 360°.
Do you want to subscribe in order to receive notifications regarding "Angle 4 click" changes.
Do you want to unsubscribe in order to stop receiving notifications regarding "Angle 4 click" changes.
Do you want to report abuse regarding "Angle 4 click".
Library Description
Library initializes and defines SPI bus driver and driver functions which offer a choice to write data in registers and to read data from registers. Library also offers a choice to sets absolute resolution read data and sets the direction. A user has an angle-reading function, a function for starting the measurement, and starting the chip calibration that is necessary for operation.
Key functions:
vuint8_t angle4_getNewAngle(uint16_t *dataOut)
- Functions for read Anglevoid angle4_startMesuremenet()
- Functions for start measurementvoid angle4_calibration(uint8_t dir, uint8_t data_resolution)
- Functions for calibration chipExample description
The application is composed of three sections:
void applicationTask()
{
angle4_getNewAngle(&Angle);
IntToStr(Angle, demoText);
mikrobus_logWrite(" Angle : ", _LOG_TEXT);
mikrobus_logWrite(demoText, _LOG_TEXT );
mikrobus_logWrite(" deg", _LOG_LINE);
Delay_ms( 200 );
}
Other MikroElektronika libraries used in the example:
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.