We strongly encourage users to use Package manager for sharing their code on Libstock website, because it boosts your efficiency and leaves the end user with no room for error. [more info]
Rating:
Author: MIKROE
Last Updated: 2020-02-14
Package Version: 1.0.0.0
mikroSDK Library: 1.0.0.0
Category: Audio & Speech
Downloaded: 2702 times
Not followed.
License: MIT license
The Ambient 11 Click is a Click board equipped with the VEML6035, a low power, high sensitivity, I2C ambient light sensor from Vishay Semiconductors.
Do you want to subscribe in order to receive notifications regarding "Ambient 11 Click" changes.
Do you want to unsubscribe in order to stop receiving notifications regarding "Ambient 11 Click" changes.
Do you want to report abuse regarding "Ambient 11 Click".
Library Description
This library holds functions that can be used to write data, read raw data, read and calculate ambiental illumination and check for interrupt occurence.
Key functions:
void ambient11_write_data ( uint8_t wr_cmd, uint16_t wr_data )
- Writes 16-bit data into register defined by 8-bit command.uint16_t ambient11_read_data ( uint8_t wr_cmd )
- Reads data from register defined by 8-bit command.float ambient11_calc_illumination ( float typical_res )
- Function is used to calculate ambiental illumination.Examples description
The application is composed of three sections :
void application_task ( )
{
lx_val = ambient11_calc_illumination( resolution );
FloatToStr( lx_val, log_txt );
mikrobus_logWrite( "Illumination : ", _LOG_TEXT );
mikrobus_logWrite( log_txt, _LOG_TEXT );
mikrobus_logWrite( "lx", _LOG_LINE );
mikrobus_logWrite( "-------------------------", _LOG_LINE );
Delay_ms( 2000 );
}
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. The terminal available in all MikroElektronika compilers, or any other terminal application of your choice, can be used to read the message.