ambient16 2.0.0.0
|
Ambient 16 Click is a compact add-on board used to measure the amount of the present ambient light. This board features the BH1726NUC, a 16-bit digital-output ambient light sensor with an I2C interface from Rohm Semiconductor. The BH1726NUC can detect a wide range of illuminance up to 30klx 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.
We provide a library for the Ambient 16 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 16 Click driver.
ambient16_cfg_setup
Config Object Initialization function. ambient16_init
Initialization function. ambient16_default_cfg
Click Default Configuration function. ambient16_get_part_id
Ambient 16 get part ID function. ambient16_set_gain
Ambient 16 set ADC gain function. ambient16_read_data
Ambient 16 get data in lux function. This is an example that demonstrates the use of the Ambient 16 Click board by measuring illuminance and displaying the value in Lux.
The demo application is composed of two sections :
Initializes I2C driver performs software reset and applies default settings.
Demonstrates use of Ambient 16 click board by reading data values of DATA0 and DATA1 in Lux every second, and logging 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.