ambient17 2.0.0.0
|
Ambient 17 Click is a compact add-on board used to measure the amount of the present ambient light. This board features the TSL2572, a digital-output ambient light sensor with an I2C interface from ams AG. The TSL2572 can detect a wide range of illuminance up to 60klx and provides excellent responsivity close to the human eyes' response. It is designed to control the brightness in various applications based on ambient light availability, brightness for optimum visibility, and energy efficiency. Operation in a temperature range of -30°C to 70°C ensures stable operation under extreme conditions.
We provide a library for the Ambient 17 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 Ambient 17 Click driver.
ambient17_cfg_setup
Config Object Initialization function. ambient17_init
Initialization function. ambient17_default_cfg
Click Default Configuration function. ambient17_get_int_pin
This function returns the INT pin logic state. ambient17_set_atime
This function sets the ATIME register for the selected ALS integration time. ambient17_measure_light_level
This function reads the raw ADC data from two channels and then measures the light level in lux based on those readings. This example demonstrates the use of Ambient 17 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.
Waits for the data ready interrupt, then reads the ambient light level in Lux and displays the results on the USB UART. By default, the data ready interrupt triggers
upon every ADC cycle which will be performed every 200ms.
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.