TOP Contributors

  1. MIKROE (2649 codes)
  2. Alcides Ramos (350 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 (136522 times)
  2. FAT32 Library (69721 times)
  3. Network Ethernet Library (55833 times)
  4. USB Device Library (46164 times)
  5. Network WiFi Library (41797 times)
  6. FT800 Library (40980 times)
  7. GSM click (28920 times)
  8. PID Library (26383 times)
  9. mikroSDK (26274 times)
  10. microSD click (25296 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: 1324 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

MRAM 2 click

0

MRAM 2 Click is a compact add-on board for applications that must store and retrieve data and programs quickly using a small number of pins.

[Learn More]

microSD click

8

This project consists of several blocks that demonstrate various aspects of usage of the MMC_Fat16 library.

[Learn More]

LED Driver 4 click

5

LED Driver 4 click is a form of a high-efficiency boost converter that is ideally suited for driving an array of white LEDs. The driver has the ability to dim the connected LED array, without producing any noise on the output.

[Learn More]