light3
2.1.0.0
|
Light 3 Click is a compact add-on board for precise ambient light measurement in automotive applications. This board features the OPT4003-Q1, an automotive-grade digital ambient light sensor from Texas Instruments. This digital ambient light sensor excels in detecting both visible and near-infrared light with high accuracy, thanks to its dual-channel functionality and filters that mimic the human eye's response while efficiently segregating NIR light.
We provide a library for the Light 3 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 3 Click driver.
light3_cfg_setup
Config Object Initialization function. light3_init
Initialization function. light3_default_cfg
Click Default Configuration function. light3_sw_reset
This function is used to perform software reset. light3_write_reg
This function writes a desired data into the selected register by using I2C serial interface. light3_get_ch0_data
This function reads ambient light data from the Channel 0 and performs the calculatios from raw data to Lux. This example demonstrates the use of Light 3 Click board by measuring the ambient light level in Lux.
The demo application is composed of two sections :
Initializes the driver and performs the Click default configuration.
Reading channel 0 ambient light level in lux as soon as it is available ( once in 1.6 seconds ) 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.