TOP Contributors

  1. MIKROE (2653 codes)
  2. Alcides Ramos (351 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 (136642 times)
  2. FAT32 Library (69856 times)
  3. Network Ethernet Library (55898 times)
  4. USB Device Library (46236 times)
  5. Network WiFi Library (41869 times)
  6. FT800 Library (41095 times)
  7. GSM click (28948 times)
  8. PID Library (26403 times)
  9. mikroSDK (26321 times)
  10. microSD click (25331 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: 2561 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

Flash 4 click

0

Flash 4 click is a perfect solution for the mass storage option in various embedded applications. With fast performance being one of its key features, Flash 4 click can also be used for the code shadowing, execute-in-place (XIP), and data storage.

[Learn More]

I2C Isolator 2 click

0

I2C Isolator 2 click provides I2C lines and power isolation for slave devices. It carries the ADM3260 dual I2C isolator with an integrated DC-to-DC converter. I2C Isolator 2 click is designed to run on either 3.3V or 5V power supply.

[Learn More]

LightRanger 4 click

0

Light Ranger 4 click is an accurate distance measurement Click board based on a ToF (Time of Flight) measurement principle.

[Learn More]