motion 2.0.0.0
|
MOTION click is a motion detector sensitive only to live bodies. It carries PIR500B, a pyroelectric sensor. The click is designed to run on 3.3V power supply only.
We provide a library for the Motion 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 Motion Click driver.
- Initialization function.void motion_cfg_setup ( motion_cfg_t *cfg );
MOTION_RETVAL motion_init ( motion_t *ctx, motion_cfg_t *cfg );
void motion_default_cfg ( motion_t *ctx );
- Set states of the enable pinmotion_pin_state_t motion_get_detected ( motion_t *ctx );
void motion_set_en_pin ( motion_t *ctx, motion_pin_state_t en_state );
This application detects any motion around it and shows message
The demo application is composed of two sections :
Initializes Driver enable's the motion detection.
Detect the motion and send a notification to the UART.
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.