All Projects → hepingood → uvis25

hepingood / uvis25

Licence: MIT license
uvis25 full function driver

Programming Languages

c
50402 projects - #5 most used programming language

Projects that are alternatives of or similar to uvis25

adxl345
ADXL345 full function driver for general MCU and Linux.
Stars: ✭ 170 (+1207.69%)
Mutual labels:  spi, mcu, iic, full-function-driver
bmp388
bmp388 full function driver
Stars: ✭ 14 (+7.69%)
Mutual labels:  spi, mcu, iic, full-function-driver
bmp180
bmp180 full function driver
Stars: ✭ 57 (+338.46%)
Mutual labels:  mcu, iic, full-function-driver
mlx90614
mlx90614 full function driver
Stars: ✭ 17 (+30.77%)
Mutual labels:  mcu, iic, full-function-driver
mcp9600
mcp9600 full function driver
Stars: ✭ 22 (+69.23%)
Mutual labels:  mcu, iic, full-function-driver
ina219
ina219 full function driver
Stars: ✭ 27 (+107.69%)
Mutual labels:  mcu, iic, full-function-driver
sht31
sht31 full function driver
Stars: ✭ 28 (+115.38%)
Mutual labels:  mcu, iic, full-function-driver
max30205
max30205 full function driver
Stars: ✭ 18 (+38.46%)
Mutual labels:  mcu, iic, full-function-driver
mcp4725
mcp4725 full function driver
Stars: ✭ 15 (+15.38%)
Mutual labels:  mcu, iic, full-function-driver
ssd1351
ssd1351 full function driver
Stars: ✭ 34 (+161.54%)
Mutual labels:  spi, mcu, full-function-driver
max7219
MAX7219 full function driver for general MCU and Linux.
Stars: ✭ 86 (+561.54%)
Mutual labels:  spi, mcu, full-function-driver
at24cxx
at24cxx full function driver
Stars: ✭ 28 (+115.38%)
Mutual labels:  mcu, iic, full-function-driver
fm24clxx
fm24clxx full function driver
Stars: ✭ 0 (-100%)
Mutual labels:  mcu, iic, full-function-driver
pcf8591
pcf8591 full function driver
Stars: ✭ 32 (+146.15%)
Mutual labels:  mcu, iic, full-function-driver
sgp30
sgp30 full function driver
Stars: ✭ 24 (+84.62%)
Mutual labels:  mcu, iic, full-function-driver
Nf Interpreter
⚙️ nanoFramework Interpreter, CLR, HAL, PAL and reference target boards
Stars: ✭ 168 (+1192.31%)
Mutual labels:  spi, mcu
Can library
Multiplatform Arduino library for supporting the native CAN controller on Due (SAM3X) and Teensy 3.1 (K2X) as well as MCP2515 through SPI
Stars: ✭ 81 (+523.08%)
Mutual labels:  spi, mcu
awesome-embedded-swift
⚡️🛠🧰 A curated list for Embedded and Low-Level development in the Swift programming language.
Stars: ✭ 57 (+338.46%)
Mutual labels:  spi, mcu
w25qxx
w25qxx full function driver
Stars: ✭ 440 (+3284.62%)
Mutual labels:  spi, mcu
IOsonata
IOsonata multi-platform multi-architecture power & performance optimized software library for fast and easy IoT MCU firmware development. Object Oriented design, no board package to define, just pure plug & play any boards
Stars: ✭ 40 (+207.69%)
Mutual labels:  spi, mcu

English | 简体中文 | 繁體中文 | 日本語 | Deutsch | 한국어

LibDriver UVIS25

MISRA API License

The UVIS25 is a digital UV index sensor able to provide an accurate measurement of the ultraviolet radiation index (UVI) from sunlight. It includes a sensing element and a mixed signal ASIC to provide the UV index data through I2C and SPI interfaces.A dedicated technology has been developed to achieve the greatest accuracy for UV index measurements. The UVIS25 allows the measurement of the UV index, without the need for a dedicated algorithm to calculate the UV index and without specific calibrations at the customer manufacturing line. The device can be configured to generate interrupt events based on a threshold crossing or when a new set of data is generated. The event is available in a register as well as on a dedicated pin. The UVIS25 is available in a full-mold LGA package (LGA). It is guaranteed to operate over a temperature range extending from -20 °C to +85 °C. The package is transparent to allow external solar radiation to reach the sensing element.

LibDriver UVIS25 is the full function driver of UVIS25 launched by LibDriver.It provides continuous reading of UV index, single reading of UV index, interruption of UV index threshold and other functions. LibDriver is MISRA compliant.

Table of Contents

Instruction

/src includes LibDriver UVIS25 source files.

/interface includes LibDriver UVIS25 IIC and SPI platform independent template。

/test includes LibDriver UVIS25 driver test code and this code can test the chip necessary function simply。

/example includes LibDriver UVIS25 sample code.

/doc includes LibDriver UVIS25 offline document.

/datasheet includes UVIS25 datasheet。

/project includes the common Linux and MCU development board sample code. All projects use the shell script to debug the driver and the detail instruction can be found in each project's README.md.

Install

Reference /interface IIC and SPI platform independent template and finish your platform IIC and SPI driver.

Add /src, /interface and /example to your project.

Usage

example basic

uint8_t res;
uint32_t i;
float uv;

res = uvis25_basic_init(UVIS25_INTERFACE_IIC);
if (res != 0)
{
    return 1;
}

...

for (i = 0; i < 3; i++)
{
    uvis25_interface_delay_ms(2000);
    res = uvis25_basic_read((float *)&uv);
    if (res != 0)
    {
        (void)uvis25_basic_deinit();

        return 1;
    }
    uvis25_interface_debug_print("uvis25: uv is %0.4f.\n", uv);
    
    ...
    
}

...

(void)uvis25_basic_deinit();

return 0;

example shot

uint8_t res;
uint8_t i;
float uv;

res = uvis25_shot_init(UVIS25_INTERFACE_IIC);
if (res != 0)
{
    return 1;
}

...

for (i=0; i<times; i++)
{
    uvis25_interface_delay_ms(2000);
    res = uvis25_shot_read((float *)&uv);
    if (res != 0)
    {
        (void)uvis25_shot_deinit();

        return 1;
    }
    uvis25_interface_debug_print("uvis25: uv is %0.4f.\n", uv);
    
    ...
    
}

...

(void)uvis25_shot_deinit();

return 0;

example interrupt

uint8_t res;
uint8_t i;
float uv;
uint8_t g_flag;

void gpio_irq(void)
{
    g_flag = 1;
}

res = gpio_interrupt_init();
if (res != 0)
{
    return 1;
}
res = uvis25_interrupt_init(UVIS25_INTERFACE_IIC, UVIS25_INTERRUPT_TYPE_UV_INDEX_HIGH_LOW, 1.2f);
if (res != 0)
{
    (void)gpio_interrupt_deinit();

    return 1;
}

...

g_flag = 0;
for (i = 0; i < 3; i++)
{
    uvis25_interface_delay_ms(2000);
    res = uvis25_interrupt_read((float *)&uv);
    if (res != 0)
    {
        (void)uvis25_interrupt_deinit();
        (void)gpio_interrupt_deinit();

        return 1;
    }
    uvis25_interface_debug_print("uvis25: uv is %0.4f.\n", uv);
    
    ....
    
    if (g_flag != 0)
    {
        uvis25_interface_debug_print("uvis25: find interrupt.\n");

        break;
    }
    
    ...
    
}

...

(void)uvis25_interrupt_deinit();
(void)gpio_interrupt_deinit();;

return 0;

Document

Online documents: https://www.libdriver.com/docs/uvis25/index.html

Offline documents: /doc/html/index.html

Contributing

Please sent an e-mail to [email protected]

License

Copyright (c) 2015 - present LibDriver All rights reserved

The MIT License (MIT)

Permission is hereby granted, free of charge, to any person obtaining a copy

of this software and associated documentation files (the "Software"), to deal

in the Software without restriction, including without limitation the rights

to use, copy, modify, merge, publish, distribute, sublicense, and/or sell

copies of the Software, and to permit persons to whom the Software is

furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all

copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR

IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,

FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE

AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER

LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,

OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE

SOFTWARE.

Contact Us

Please sent an e-mail to [email protected]

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].