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-06-13
Package Version: 1.0.0.0
mikroSDK Library: 1.0.0.0
Category: Optical
Downloaded: 3271 times
Not followed.
License: MIT license
Ambient 7 Click is a light intensity-sensing and measuring Click board, which features an accurate light-intensity sensor labeled as SFH 5701 A01, made by Osram Opto Semiconductors.
Do you want to subscribe in order to receive notifications regarding "Ambient 7 click" changes.
Do you want to unsubscribe in order to stop receiving notifications regarding "Ambient 7 click" changes.
Do you want to report abuse regarding "Ambient 7 click".
Library Description
The library contains ADC functions to completely setting and reading the value from the ADC channel that sends Ambient click. The ambient light measurement resolution depends on the ADC resolution you use.
Key functions:
void ambient7_adcInit()
- ADC init.void ambient7_adcSetInputChannel()
- ADC set input channel.uint32_t ambient7_adcRead()
- ADC read data.Examples description
The application is composed of three sections :
void applicationTask()
{
uint16_t ADC_value;
char demoText[ 50 ];
ADC_value = ambient7_adcRead();
WordToStr(ADC_value, demoText);
mikrobus_logWrite(" ADC value: ", _LOG_TEXT);
mikrobus_logWrite(demoText, _LOG_LINE);
Delay_ms( 500 );
}
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.