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: 2018-11-07
Package Version: 1.0.0.0
mikroSDK Library: 1.0.0.0
Category: Optical
Downloaded: 3924 times
Not followed.
License: MIT license
Ambient 4 click is a light, intensity-sensing and measuring Click boardâ„¢, which features an accurate, light-intensity sensor labeled as BH1721FVC, made by ROHM corporation.
Do you want to subscribe in order to receive notifications regarding "Ambient 4 click" changes.
Do you want to unsubscribe in order to stop receiving notifications regarding "Ambient 4 click" changes.
Do you want to report abuse regarding "Ambient 4 click".
Library Description
The library contains all the necessary functions for working with Ambient 4 click.
Key functions:
void ambient4_sendCommand(uint8_t cmd)
- Function for send commanduint16_t ambient4_readData
- Function for read 16bit datavoid ambient4_deviceReset()
- Function for device resetExample description
The application is composed of the three sections:
void applicationInit()
{
readValue = ambient4_readData();
IntToStr(readValue, demoText);
mikrobus_logWrite(" Ambient light: ", _LOG_TEXT);
mikrobus_logWrite(demoText, _LOG_TEXT);
mikrobus_logWrite(" lx ", _LOG_LINE);
Delay_1sec();
}
Other MikroElektronika libraries used in the example:
Additional notes and information
Depending on the development board you are using, you may need USB UART click, USB UART 2 clickor 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.