TOP Contributors

  1. MIKROE (2745 codes)
  2. Alcides Ramos (371 codes)
  3. Shawon Shahryiar (307 codes)
  4. jm_palomino (118 codes)
  5. Bugz Bensce (90 codes)
  6. S P (73 codes)
  7. dany (71 codes)
  8. MikroBUS.NET Team (35 codes)
  9. NART SCHINACKOW (34 codes)
  10. Armstrong Subero (27 codes)

Most Downloaded

  1. Timer Calculator (138914 times)
  2. FAT32 Library (71500 times)
  3. Network Ethernet Library (56914 times)
  4. USB Device Library (47269 times)
  5. Network WiFi Library (42993 times)
  6. FT800 Library (42282 times)
  7. GSM click (29724 times)
  8. mikroSDK (27668 times)
  9. PID Library (26828 times)
  10. microSD click (26087 times)
Libstock prefers package manager

Package Manager

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]

< Back
mikroSDK Library

Angle 2 click

Rating:

5

Author: MIKROE

Last Updated: 2018-11-30

Package Version: 1.0.0.0

mikroSDK Library: 1.0.0.0

Category: Magnetic

Downloaded: 3670 times

Not followed.

License: MIT license  

Angle 2 click is a magnetic rotational sensor which relies on the ultra-fast MA700 angular sensor IC.

No Abuse Reported

Do you want to subscribe in order to receive notifications regarding "Angle 2 click" changes.

Do you want to unsubscribe in order to stop receiving notifications regarding "Angle 2 click" changes.

Do you want to report abuse regarding "Angle 2 click".

  • mikroSDK Library 2.0.0.0
  • Comments (0)
DOWNLOAD LINK RELATED COMPILER CONTAINS
mikroBasic PRO for ARM
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroBasic PRO for AVR
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroBasic PRO for dsPIC30/33 & PIC24
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroBasic PRO for FT90x
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroBasic PRO for PIC
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroBasic PRO for PIC32
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroC PRO for ARM
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroC PRO for AVR
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroC PRO for dsPIC30/33 & PIC24
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroC PRO for FT90x
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroC PRO for PIC
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroC PRO for PIC32
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroPascal PRO for ARM
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroPascal PRO for AVR
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroPascal PRO for dsPIC30/33 & PIC24
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroPascal PRO for FT90x
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroPascal PRO for PIC
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroPascal PRO for PIC32
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc

mikroSDK Library Blog

Angle 2 click

Angle 2 click

Native view of the Angle 2 Click board.

View full image
Angle 2 click

Angle 2 click

Front and back view of the Angle 2 Click board.

View full image

Library Description

The library can perform a control of the Angle 2 Click board. Also can measure the angle value in degrees with a range of 0 deg to 359.91 deg. Zero position setting also can be performed by using this library. The library offers a choice to save content of an entire selected register in OTP memory. For more details check documentation.

Key functions:

  • T_ANGLE2_DEG_VAL angle2_writeReg( uint8_t regAddr, uint8_t dataIn ) - Function writes one byte data to the register.
  • T_ANGLE2_DEG_VAL angle2_getAngle( void ) - Function returns angle value in degrees with a range from 0 to 359.91.
  • void angle2_setZeroScale( T_ANGLE2_DEG_VAL zeroDeg ) - Function sets a zero position value in degrees with 12-bit resolution.

Examples description

The application is composed of the three sections :

  • System Initialization - Initializes peripherals and pins.
  • Application Initialization - Initializes SPI interface in Mode 3 and performs a device configuration for properly working.
  • Application Task - (code snippet) - Reads angle value in degrees and logs results on uart terminal.
void applicationTask()
{
    angle = angle2_getAngle();
    
    FloatToStr( angle, text );
    floatCut();
    
    mikrobus_logWrite( "Angle is: ", _LOG_TEXT );
    mikrobus_logWrite( text, _LOG_TEXT );
    mikrobus_logWrite( " deg", _LOG_LINE );

    Delay_ms( 200 );

}

Additional Functions :

  • void floatCut()  - Makes float value to be rounded on two decimal places.

Other mikroE Libraries used in the example:

  • Conversions
  • SPI
  • UART

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.

ALSO FROM THIS AUTHOR

Fan 2 click

0

Fan 2 click carries the MAX31760 precision fan-speed controller. It can measure temperature and adjust the fan speed to keep the temperature at the same level. Fan 2 click can also control two fans at the same time.

[Learn More]

AC Current click

0

AC Current click is a device that is able to measure the alternating current (AC) running through the conductor, using the so-called non-invasive current sensor. The non-invasive sensor works by utilizing the electromagnetic induction phenomenon, similar to a transformer. The primary coil does not exist though, the electromagnetic field is generated by the AC Current running through the cable which is measured. The core of the sensing probe is split, allowing it to clamp on the current conducting cable. Since the sensor does not influence the measurement circuitry in any way while being galvanically isolated at the same time, it is an ideal solution to measure current running through mains, or similar high voltage installations.

[Learn More]

DC Motor 14 click

0

This IC includes one channel of motor output block, using a wide range of supply voltages, while delivering reasonably high current to the connected DC motors.

[Learn More]