lighthz 2.1.0.0
|
LightHz Click is a compact add-on board that effectively measures ambient light intensity. This board features the TL2L30BR, a programmable light-to-frequency converter from ams. The sensor outputs either a pulse train or a square wave (50% duty cycle) with a frequency directly proportional to light intensity (irradiance). It has programmable sensitivity and full-scale output frequency and could be used as a rough color detector with a selectable frequency range.
We provide a library for the LightHz 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 from NECTO Studio Package Manager(recommended way), downloaded from our LibStock™ or found on Mikroe github account.
This library contains API for LightHz Click driver.
lighthz_cfg_setup
Config Object Initialization function. lighthz_init
Initialization function. lighthz_set_sensitivity
This function sets the sensor sensitivity. lighthz_set_frequency_scaling
This function sets the sensor frequency scaling. lighthz_get_freq_pin
This function returns the freq pin logic state. This example demonstrates the use of LightHz click board by measuring and displaying the frequency of clock output signal.
The higher the light intensity the higher the frequency.
The demo application is composed of two sections :
Initializes the driver and sets the sensitivity mode and frequency scaling in case the onboard jumpers are set to MCU instead to ON-BRD.
Measures the clock output frequency using the polling method and delays. The results are being sent to the USB UART.
The full application code, and ready to use projects can be installed directly from NECTO Studio Package Manager(recommended way), downloaded from our LibStock™ or found on Mikroe github account.
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. UART terminal is available in all MikroElektronika compilers.