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: 2019-04-12
Package Version: 1.0.0.0
mikroSDK Library: 1.0.0.0
Category: Optical
Downloaded: 3755 times
Not followed.
License: MIT license
Ambient 6 click can sense the intensity of the ambient light, providing the measurement data in digital format over the I2C interface. It utilizes the VEML7700, a miniature ambient light sensor (ALS) with I2C interface.
Do you want to subscribe in order to receive notifications regarding "Ambient 6 click" changes.
Do you want to unsubscribe in order to stop receiving notifications regarding "Ambient 6 click" changes.
Do you want to report abuse regarding "Ambient 6 click".
Library Description
Library initializes and defines I2C bus driver and driver functions which offer a choice to write data in registers and to read data from registers. Library also offers a choice to reads ambient data and ambient light in LUX. The user also has the function for configuration chip.
Key functions:
uint16_t ambient6_getAmbientData()
- Functions for read 16bit Ambient Data (ALS).float ambient6_getAmbientLight()
- Functions for get Ambient Light Data.void ambient6_configuration(uint16_t configData)
- Functions for configuration device for measurement.Examples description
The application is composed of the three sections :
void applicationTask()
{
char demoText[ 50 ];
float AmbientLight;
AmbientLight = ambient6_getAmbientLight();
FloatToStr(AmbientLight,demoText);
demoText[ 7 ] = 0;
mikrobus_logWrite(" Ambient Light : ", _LOG_TEXT);
mikrobus_logWrite(demoText, _LOG_TEXT);
mikrobus_logWrite(" lx", _LOG_LINE);
Delay_1sec();
}
Other mikroE Libraries used in the example:
I2C
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.