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]
Rating:
Author: MIKROE
Last Updated: 2019-03-28
Package Version: 1.0.0.1
mikroSDK Library: 1.0.0.0
Category: Motion
Downloaded: 4346 times
Followed by: 5 users
License: MIT license
Vibra Sense click is a low cost micro shock vibration sensor with a digital output which can be set as an Interrupt (mikroBUS INT pin). An onboard potentiometer lets you set the interrupt threshold.
The board is designed to use either a 3.3V and a 5V power supply.
Do you want to subscribe in order to receive notifications regarding "Vibra sense click" changes.
Do you want to unsubscribe in order to stop receiving notifications regarding "Vibra sense click" changes.
Do you want to report abuse regarding "Vibra sense click".
Library Description
The library covers all the functions necessary for the use of Vibra sense Click board.
Vibra sense Click uses GPIO and PWM to communicate. This library contains drivers for
enabling or disabling PWM and for enabling, disabling or reseting the device itself and
a function for checking the interrupt pin.
Key functions:
void vibrasense_enable()
- Function sets the RST pin.Examples Description
The application is composed of three sections:
void applicationTask() { if( vibrasense_checkInterrupt() ) { mikrobus_logWrite( " TILT!!! ", _LOG_LINE ); mikrobus_logWrite( "-------------------", _LOG_LINE ); vibrasense_pwmStart(); Delay_ms( 100 ); vibrasense_pwmStop(); Delay_ms( 200 ); } }
Other mikroE Libraries used in the example:
Additional notes and informations
Depending on the development board you are using, you may need USB UART click, USB 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