TOP Contributors

  1. MIKROE (2693 codes)
  2. Alcides Ramos (362 codes)
  3. Shawon Shahryiar (307 codes)
  4. jm_palomino (112 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 (137949 times)
  2. FAT32 Library (70758 times)
  3. Network Ethernet Library (56443 times)
  4. USB Device Library (46825 times)
  5. Network WiFi Library (42586 times)
  6. FT800 Library (41785 times)
  7. GSM click (29468 times)
  8. mikroSDK (27020 times)
  9. PID Library (26661 times)
  10. microSD click (25797 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 2 click

Rating:

5

Author: MIKROE

Last Updated: 2019-08-21

Package Version: 1.0.0.0

mikroSDK Library: 1.0.0.0

Category: Haptic

Downloaded: 2883 times

Not followed.

License: MIT license  

Vibro Motor 2 Click features a compact size Eccentric Rotating Mass (ERM) motor, labeled as Z4FC1B1301781 as well as DMG3420U MOSFET to drive the ERM motor, since the MCU itself cannot provide enough power for the motor driving.

No Abuse Reported

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

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

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

Vibro Motor 2 Click

Vibro Motor 2 Click

Native view of the Vibro Motor 2 Click board.

View full image
Vibro Motor 2 Click

Vibro Motor 2 Click

Front and back view of the Vibro Motor 2 Click board.

View full image

Library Description

This library helps user to define the all necessary GPIOs to control vibro motor. For Vibro Motor 2 Click board user only needs PWM pin on MIKROBUS. For more details check documentation.

Key functions:

  • void vm2_gpioDriverInit( T_VM2_P gpioObj ); - This function initializes GPIO driver.

Examples description

The application is composed of three sections :

  • System Initialization - Initializes peripherals and pins.
  • Application Initialization - Initializes GPIO driver and PWM. Configures PWM to 20kHz frequency, calculates maximum duty ratio and starts PWM with duty ratio value 0.
  • Application Task - (code snippet) - Allows user to enter desired command to control Vibro Motor 2 Click board. The command can be entered from the serial port. The possible commands are :
    • characters from '1' to '9' to set duty ratio step (step = character * 5)
    • character '0' to set duty ratio step on value 100
    • character '+' to increment current duty ratio by selected step
    • character '-' to decrement current duty ratio by selected step
    • characters 'e' and 'E' to start Vibro Motor 2
    • characters 'd' and 'D' to stop Vibro Motor 2
    • characters 's' and 'S' to check Vibro Motor 2 (PWM) status
void applicationTask()
{
    rx_dat = UART_Rdy_Ptr();
    
    if (rx_dat != _RX_NOT_READY)
    {
        rx_dat = UART_Rd_Ptr();
        
        checkRx();
    }
}

Additional Functions :

  • checkRx - Executes the command (entered by user) processing.

Other mikroE Libraries used in the example:

  • Conversions
  • C_String
  • PWM
  • UART

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

Force 5 click

5

Force 5 Click is a compact add-on board that contains a stable and flexible compensated/amplified micro force sensor.

[Learn More]

microSD click

8

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

[Learn More]

Magnetic linear click

6

Magnetic linear click is the very accurate position sensing Click board which utilizes the HMC1501, a linear magnetic displacement sensor IC.

[Learn More]