TOP Contributors

  1. MIKROE (2658 codes)
  2. Alcides Ramos (355 codes)
  3. Shawon Shahryiar (307 codes)
  4. jm_palomino (112 codes)
  5. Chisanga Mumba (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 (136925 times)
  2. FAT32 Library (70047 times)
  3. Network Ethernet Library (56012 times)
  4. USB Device Library (46313 times)
  5. Network WiFi Library (41935 times)
  6. FT800 Library (41241 times)
  7. GSM click (29028 times)
  8. PID Library (26435 times)
  9. mikroSDK (26415 times)
  10. microSD click (25390 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: 3192 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

IR click

0

IR Click is an add-on board in mikroBUS form factor. It’s a compact and easy solution for adding infrared (IR) remote control module to your design.

[Learn More]

TempHum 19 click

0

Temp&Hum 19 Click is a compact add-on board that represents temperature and humidity sensing solution. This board features the BPS240, a highly accurate relative humidity and temperature sensor from Bourns. This sensor, characterized by its high accuracy (±2% from 20% to 80%RH (±4% over entire humidity range)) and high resolution, provides 10-bit data to the host controller with a configurable I2C interface.

[Learn More]

Motion 3 click

5

Motion 3 Click is a Click board based on EKMC1606112, PIR motion sensor from Panasonic Corporation that's used as human motion detector.

[Learn More]