light4
2.1.0.0
|
Light 4 Click is a compact add-on board designed for precise ambient light, UV index, and light flicker detection. This board features the TSL2585 sensor from ams OSRAM, which incorporates photopic, infrared (IR), and ultraviolet (UV) photodiodes to enable multiple concurrent sensing functions. The TSL2585 continuously monitors ambient light, calculates irradiance, and detects light flicker using optimized filters and dedicated IR and UV channels. It communicates with the host MCU via a standard I2C interface, includes interrupt-driven events for threshold-based alerts, and operates with 3.3V logic voltage.
We provide a library for the Light 4 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 Light 4 Click driver.
light4_cfg_setup
Config Object Initialization function. light4_init
Initialization function. light4_default_cfg
Click Default Configuration function. light4_write_reg
This function writes a byte into the selected register by using I2C serial interface. light4_sw_reset
This function is used to perform software reset of Light 4 Click board. light4_read_channel_data
This function is used to read data from selected channel of Light 4 Click board. This example demonstrates the use of Light 4 Click board by measuring
the ambient light level in Lux.
The demo application is composed of two sections :
Initializes the driver, performs the Click default configuration
and checking I2C Communication by reading Device ID.
Reading channel 0 ambient light level in lux once per
second and displaying it on the UART terminal.
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.