TOP Contributors

  1. MIKROE (2642 codes)
  2. Alcides Ramos (347 codes)
  3. Shawon Shahryiar (307 codes)
  4. jm_palomino (112 codes)
  5. Chisanga Mumba (90 codes)
  6. S P (73 codes)
  7. dany (71 codes)
  8. MikroBUS.NET Team (35 codes)
  9. NART SCHINACKOW (34 codes)
  10. Armstrong Subero (27 codes)

Most Downloaded

  1. Timer Calculator (136223 times)
  2. FAT32 Library (69492 times)
  3. Network Ethernet Library (55710 times)
  4. USB Device Library (45993 times)
  5. Network WiFi Library (41639 times)
  6. FT800 Library (40801 times)
  7. GSM click (28789 times)
  8. PID Library (26332 times)
  9. mikroSDK (26059 times)
  10. microSD click (25145 times)
Libstock prefers package manager

Package Manager

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]

< Back
mikroSDK Library

UV 2 click

Rating:

2

Author: MIKROE

Last Updated: 2019-01-10

Package Version: 1.0.0.1

mikroSDK Library: 1.0.0.0

Category: Optical

Downloaded: 3888 times

Not followed.

License: MIT license  

UV 2 click is a mikroBUS add-on board with a VEML6075 UVA and UVB light sensor.
With UV 2 click, Solar ultraviolet light intensity is converted to 16-bit digital values.
The board communicates with the target MCU through the mikroBUS I2C interface. Designed to use a 3.3 power supply only.

No Abuse Reported

Do you want to subscribe in order to receive notifications regarding "UV 2 click" changes.

Do you want to unsubscribe in order to stop receiving notifications regarding "UV 2 click" changes.

Do you want to report abuse regarding "UV 2 click".

  • mikroSDK Library 2.0.0.0
  • Comments (2)
DOWNLOAD LINK RELATED COMPILER CONTAINS
mikroBasic PRO for ARM
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroBasic PRO for AVR
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroBasic PRO for dsPIC30/33 & PIC24
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroBasic PRO for FT90x
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroBasic PRO for PIC
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroBasic PRO for PIC32
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroC PRO for ARM
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroC PRO for AVR
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroC PRO for dsPIC30/33 & PIC24
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroC PRO for FT90x
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroC PRO for PIC
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroC PRO for PIC32
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroPascal PRO for ARM
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroPascal PRO for AVR
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroPascal PRO for dsPIC30/33 & PIC24
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroPascal PRO for FT90x
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroPascal PRO for PIC
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroPascal PRO for PIC32
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc

mikroSDK Library Blog

UV 2 click board

UV 2 click board

Front and back view of the UV 2 click board

View full image

Library Description

The library covers all the necessary functions to control UV 2 Click board.
UV 2 click communicates with the target board via I2C protocol. 
This library contains drivers for write data to and read data from VEML6075 sensor registers,
enable/disable sensor, set configuration, get measurement UV index, etc.

Key functions:

  • uint16_t uv2_getUVA() - Get UVA data function.
  • uint16_t uv2_getUVB() - Get UVB data function.
  • float uv2_getUVindex() - Get UV index function.

Examples description

The application is composed of the three sections :

  • System Initialization - Initializes I2C and LOG structures.
  • Application Initialization - Initialization driver enable's - I2C,
         set default configuration, check sensor ID and start write log.
  • Application Task - (code snippet) This is a example which demonstrates the use of UV 2 Click board.
         UV 2 Click communicates with VEML6075 sesnor via I2C by write to register and read from register. This example measurement UVA and UVB data, calculate UV index level and write log.
    Results are being sent to the Usart Terminal where you can track their changes. All data logs write on usb uart changes for every 2 sec.
void applicationTask()
{
    valUVA = uv2_getUVA(); 
    IntToStr( valUVA, logText );
    ltrim( logText );
 
    mikrobus_logWrite( " UVA data = ", _LOG_TEXT );
    mikrobus_logWrite( logText, _LOG_LINE );

    valUVB = uv2_getUVB();
    IntToStr( valUVB, logText );
    ltrim( logText );

    mikrobus_logWrite( " UVB data = ", _LOG_TEXT );
    mikrobus_logWrite( logText, _LOG_LINE );
 
    uvIndex = uv2_getUVindex();
    FloatToStr( uvIndex, logText );
    ltrim( logText );

    mikrobus_logWrite( " UV Index = ", _LOG_TEXT );
    mikrobus_logWrite( logText, _LOG_LINE );
    mikrobus_logWrite( "------------------------", _LOG_LINE );

    Delay_ms( 2000 );
}

Other mikroE Libraries used in the example:

  • I2C
  • UART

Additional notes and information

Depending on the development board you are using, you may need USB UART clickUSB 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.

ALSO FROM THIS AUTHOR

BLE 12 click

0

BLE 12 Click is a compact add-on board that provides BT/BLE connectivity for any embedded application. This board features the BM832A, a powerful and highly flexible, ultra low power Bluetooth Low Energy (BLE) module from Fanstel. Based on the Nordic nRF52 SoC, the BM832A supports Bluetooth 5.0 Low-Energy (BLE) connectivity while delivering RF range and performance, debugging and enhanced security features, and low power consumption. It also comes with an ARM Cortex™ M4(F) MCU up to 192kB flash and 24kB RAM, embedded 2.4GHz multi-protocol transceiver, and an integrated PCB trace antenna. This Click board™ is suitable for low-cost Bluetooth low energy applications such as building automation and sensor networks, portable medical, connected home, and more.

[Learn More]

GMR Angle click

0

The GMR Angle Click is a Click board™ that features the TLI5012B E1000, which is a pre-calibrated 360° angle sensor that detects the orientation of a magnetic field, made by Infineon. The GMR Angle click is ideal for angular position sensing in industrial and consumer applications such as electrical commutated motor (e.g. BLDC), fans or pumps.

[Learn More]

Earthquake click

0

Earthquake click carries D7S, the world’s smallest high-precision seismic sensor from Omron. The click is designed to run on either 3.3V or 5V power supply. It communicates with the target MCU over I2C interface, with additional functionality provided by the following pins on the mikroBUS™ line: PWM, INT, CS.

[Learn More]