TOP Contributors

  1. MIKROE (2663 codes)
  2. Alcides Ramos (358 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 (137099 times)
  2. FAT32 Library (70236 times)
  3. Network Ethernet Library (56124 times)
  4. USB Device Library (46434 times)
  5. Network WiFi Library (42077 times)
  6. FT800 Library (41387 times)
  7. GSM click (29116 times)
  8. mikroSDK (26562 times)
  9. PID Library (26489 times)
  10. microSD click (25487 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: 1384 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

Flicker click

0

FLICKER click is perfect, simple solution if you need to turn a device on and off at specific time intervals, like blinking LED commercials, alarm system lights, or any other signalling lights. This example shows how by using the button you can start time relay and configure it's duration of on and off period.

[Learn More]

AudioAmp 3 click

0

AudioAmp 3 Click is a stereo audio amplifier, capable of delivering up to 79W per channel with the 4Ω load.

[Learn More]

SWO Trace

10

The ARM SWO trace port uses a single pin to stream out data packets over 32 different ports, using the specified clock rate. The SWO is a part of the ARM® CoreSight Debug module which is incorporated in most of the MCUs based on the Cortex®-M3, M4, and M7 core.

[Learn More]