TOP Contributors

  1. MIKROE (2752 codes)
  2. Alcides Ramos (372 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 (139062 times)
  2. FAT32 Library (71593 times)
  3. Network Ethernet Library (56989 times)
  4. USB Device Library (47330 times)
  5. Network WiFi Library (43006 times)
  6. FT800 Library (42297 times)
  7. GSM click (29777 times)
  8. mikroSDK (27874 times)
  9. PID Library (26858 times)
  10. microSD click (26129 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

Vibro Motor 3 click

Rating:

5

Author: MIKROE

Last Updated: 2020-11-30

Package Version: 1.0.0.0

mikroSDK Library: 1.0.0.0

Category: Haptic

Downloaded: 1746 times

Not followed.

License: MIT license  

Vibro Motor 3 Click is a compact add-on board that makes an ideal solution for adding simple haptic feedback in any design.

No Abuse Reported

Do you want to subscribe in order to receive notifications regarding "Vibro Motor 3 click" changes.

Do you want to unsubscribe in order to stop receiving notifications regarding "Vibro Motor 3 click" changes.

Do you want to report abuse regarding "Vibro Motor 3 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

Vibro Motor 3 click

Vibro Motor 3 click

Native view of the Vibro Motor 3 click board.

View full image
Vibro Motor 3 click

Vibro Motor 3 click

Front and back view of the Vibro Motor 3 click board.

View full image

Library Description

The library covers all the necessary functions to control Vibro Motor 3 Click board™. Library holds the drivers for writeing and reading, for enable/diasble the device, trigger the device, sets desired mode function, resets all register, for getting status, start or stop the motor, etc.

Key functions:

  • void vibromotor3_set_mode ( uint8_t mode_sel ); - Function is used to apply the desired mode.
  • void vibromotor3_start_motor ( uint8_t state ); - The function is used to start or stop the motor.
  • void vibromotor3_set_lra_mode ( uint8_t state ); - The function is used to sets the device in LRA mode.

Examples description

The application is composed of three sections :

  • System Initialization - Initializes I2C, GPIO and LOG structures, and sets CS and PWM pins as output ,and start to write log.
  • Application Initialization - Initalizes I2C driver, PWM driver and configures Vibro Motor 3 Click board™.
  • Application Task - This example shows the capabilities of the Vibro Motor 3 Click board™ by changeing duty cycle applied in order to get different vibrations.
void application_task ( )
{
    pwm_duty_cycle += 1000;
    mikrobus_logWrite( "Duty cycle applied: ", _LOG_TEXT );
    WordToStr( pwm_duty_cycle, log_txt );
    Ltrim( log_txt );
    mikrobus_logWrite( log_txt, _LOG_LINE );
    vibromotor3_pwm_set_duty( pwm_duty_cycle );
    if ( pwm_duty_cycle > pwm_max_duty )
    {
        pwm_duty_cycle = 0;
        vibromotor3_pwm_stop( );
        Delay_ms( 2000 );
        vibromotor3_pwm_start( );
    }
    Delay_ms( 100 );
}

Other mikroE Libraries used in the example:

  • I2C
  • UART
  • PWM
  • Conversions

Additional notes and informations

Depending on the development board you are using, you may need USB UART clickUSB 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

EVC Click

0

EVC Click is a six-channel digital volume controller, equipped with an integrated electronic volume control circuit, which can be controlled over the I2C interface.

[Learn More]

Compass 4 click

5

Compass 4 Click is an expansion board that can measure the three-axis magnetic field which is perfect for implementation in applications such as electric compasses. This board features AK09915, a complete 3-axis magnetic sensor with signal processing from AKM.

[Learn More]

Thermo 20 click

5

Thermo 20 Click is a compact add-on board that provides an accurate temperature measurement. This board features the TSYS03, a miniature digital temperature sensor that comes up with factory calibrated, highly accurate temperature data from TE Connectivity Measurement Specialties.

[Learn More]