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: 2020-04-28
Package Version: 1.0.0.0
mikroSDK Library: 1.0.0.0
Category: Motion
Downloaded: 2733 times
Not followed.
License: MIT license
Motion 4 Click is a Click board based on EKMC1603111, PIR motion sensor from Panasonic Corporation that's used as human motion detector.
Do you want to subscribe in order to receive notifications regarding "Motion 4 click" changes.
Do you want to unsubscribe in order to stop receiving notifications regarding "Motion 4 click" changes.
Do you want to report abuse regarding "Motion 4 click".
Library Description
Library provides functions for controlling en pin, and getting int pin state.
Key functions:
void motion4_set_en_pin ( uint8_t state )
- Function that sets en pin stateuint8_t motion4_get_int ( void )
- Function that gets int pin stateExamples description
The application is composed of three sections :
void application_task ( )
{
uint8_t int_status;
int_status = motion4_get_int();
if ( int_status != MOTION4_INTERRUPT_NOT_DETECT )
{
mikrobus_logWrite( "Motion detected", _LOG_LINE );
while ( int_status != MOTION4_INTERRUPT_NOT_DETECT )
{
int_status = motion4_get_int();
}
mikrobus_logWrite( "Motion wait", _LOG_LINE );
}
}
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.