Skip to content
CircuitPython driver for VEML6070
Branch: master
Clone or download
caternuson Merge pull request #8 from WindFishDiety/UVReadRaw
Fixes issue #7 whereby the read method should be renamed to raw_uv
Latest commit 7b6fa1d May 11, 2019
Type Name Latest commit message Commit time
Failed to load latest commit information.
docs PyPi setup. Aug 8, 2018
examples Addressing cosmetic concerns May 10, 2019
.gitignore PyPi setup. Aug 8, 2018
.pylintrc ignore the board module imports in .pylintrc Aug 25, 2018
.travis.yml PyPi setup. Aug 8, 2018 updated CoC Aug 1, 2018
LICENSE re-cookie Jan 22, 2018
README.rst Addressing cosmetic concerns May 10, 2019 Addressing cosmetic concerns May 10, 2019
requirements.txt PyPi setup. Aug 8, 2018 PyPi setup. Aug 8, 2018



Documentation Status Discord Build Status

CircuitPython driver for the VEML6070 UV Index Sensor Breakout


This driver depends on:

Please ensure all dependencies are available on the CircuitPython filesystem. This is easily achieved by downloading the Adafruit library and driver bundle.

Usage Example

import time
import board
import busio
from adafruit_veml6070 import VEML6070

with busio.I2C(board.SCL, board.SDA) as i2c:
    uv = VEML6070(i2c)
    # Alternative constructors with parameters
    #uv = VEML6070(i2c, 'VEML6070_1_T')
    #uv = VEML6070(i2c, 'VEML6070_HALF_T', True)

    # take 10 readings
    for j in range(10):
        uv_raw = uv.uv_raw
        risk_level = uv.get_index(uv_raw)
        print('Reading: {0} | Risk Level: {1}'.format(uv_raw, risk_level))


Contributions are welcome! Please read our Code of Conduct before contributing to help this project stay welcoming.

Building locally

To build this library locally you'll need to install the circuitpython-build-tools package.

python3 -m venv .env
source .env/bin/activate
pip install circuitpython-build-tools

Once installed, make sure you are in the virtual environment:

source .env/bin/activate

Then run the build:

circuitpython-build-bundles --filename_prefix adafruit-circuitpython-veml6070 --library_location .

Sphinx documentation

Sphinx is used to build the documentation based on rST files and comments in the code. First, install dependencies (feel free to reuse the virtual environment from above):

python3 -m venv .env
source .env/bin/activate
pip install Sphinx sphinx-rtd-theme

Now, once you have the virtual environment activated:

cd docs
sphinx-build -E -W -b html . _build/html

This will output the documentation to docs/_build/html. Open the index.html in your browser to view them. It will also (due to -W) error out on any warning like Travis will. This is a good way to locally verify it will pass.

You can’t perform that action at this time.