pir 2.0.0.0
|
PIR Click is a pyroelectric sensor which generates a voltage when exposed to infrared radiation emitted by live bodies. It is equipped with the PL-N823-01, an infrared sensor from KEMET that uses the pyrolectric effect of ceramic by absorbing infrared rays emitted from the human body, while the the white plastic Fresnel lens covering the sensor filters visible light.
We provide a library for the Pir 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 Pir Click driver.
- Initialization function.void pir_cfg_setup ( pir_cfg_t *cfg );
- Reading register.uint16_t pir_get_adc ( pir_t *ctx )
uint16_t pir_reg_read ( pir_t *ctx );
float pir_get_mili_volt ( pir_t *ctx, uint16_t ref_voltage );
This application which generates a voltage when exposed to infrared radiation.
The demo application is composed of two sections :
Initializes device.
Reads ADC data, converts it to miliVolts and logs scaled value in miliVolts.
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.