Simple test
Ensure your device works with this simple test.
examples/veml6075_simpletest.py
1# SPDX-FileCopyrightText: 2021 ladyada for Adafruit Industries
2# SPDX-License-Identifier: MIT
3
4import time
5
6import board
7import busio
8
9import adafruit_veml6075
10
11i2c = busio.I2C(board.SCL, board.SDA)
12
13veml = adafruit_veml6075.VEML6075(i2c, integration_time=100)
14
15print(f"Integration time: {veml.integration_time} ms")
16
17while True:
18 print(veml.uv_index)
19 time.sleep(1)