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-06-09
Package Version: 1.0.0.0
mikroSDK Library: 1.0.0.0
Category: Optical
Downloaded: 2306 times
Not followed.
License: MIT license
UVB Click is based on GUVB-C31SM ultraviolet sensor from GenUV. UVB Click supports integrated functions of ultraviolet light sensors such that can be easily configured and used in user applications.
Do you want to subscribe in order to receive notifications regarding "UVB click" changes.
Do you want to unsubscribe in order to stop receiving notifications regarding "UVB click" changes.
Do you want to report abuse regarding "UVB click".
Library Description
The library contains basic functions for working with the UVB click.
Key functions:
void uvb_configuration ( uint8_t reg, uint8_t cfg )
- Configuration registeruint8_t uvb_check_communication ( void )
- Check communicationuint16_t uvb_get_uv_data ( void )
- Get UVB dataExamples description
The application is composed of three sections :
void application_task ( )
{
uint16_t uvb_data;
char demo_text[ 20 ];
uvb_data = uvb_get_uv_data( );
IntToStr( uvb_data, demo_text );
mikrobus_logwrite( ">> UVB data: ", _LOG_TEXT );
mikrobus_logwrite( demo_text, _LOG_LINE );
mikrobus_logwrite( "--------------------------", _LOG_LINE );
Delay_ms( 1500 );
}
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.