irsense2
2.0.0.0
|
IR Sense 2 click is the infrared sensor Click boardâ„¢, designed to be used for the short range IR sensing applications.
We provide a library for the IrSense2 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 IrSense2 Click driver.
void irsense2_cfg_setup ( irsense2_cfg_t *cfg );
IRSENSE2_RETVAL irsense2_init ( irsense2_t *ctx, irsense2_cfg_t *cfg );
void irsense2_default_cfg ( irsense2_t *ctx );
int16_t irsense2_get_ir_data ( irsense2_t *ctx );
uint8_t irsense_human_detected ( irsense2_t *ctx, float ir_data );
void irsense2_get_int ( irsense2_t *ctx );
This application enables usage of IR sensor for presence detection.
The demo application is composed of two sections :
Driver initialization.
Fetches IR and temperature sensor data and prints them on terminal.
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.