vibrasense 2.0.0.0
|
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.
We provide a library for the VibraSense Click as well as a demo application (example), developed using MikroElektronika compilers. The demo can run on all the main MikroElektronika development boards.
Package can be downloaded/installed directly form compilers IDE(recommended way), or downloaded from our LibStock, or found on mikroE github account.
This library contains API for VibraSense Click driver.
- Initialization function.void vibrasense_cfg_setup ( vibrasense_cfg_t *cfg );
VIBRASENSE_RETVAL vibrasense_init ( vibrasense_t *ctx, vibrasense_cfg_t *cfg );
void vibrasense_default_cfg ( vibrasense_t *ctx );
- Reset vibra sense function.uint8_t vibrasense_check_interrupt ( vibrasense_t *ctx ) ;
void vibrasense_reset ( vibrasense_t *ctx );
This is a example which demonstrates the use of Vibra sense Click board.
The demo application is composed of two sections :
Configuring clicks and log objects.
It detects vibrations and enables PWM and writes log according to them.
The full application code, and ready to use projects can be installed directly form compilers IDE(recommneded) or found on LibStock page or mikroE GitHub accaunt.
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.