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
5import board
6import busio
7import adafruit_veml6075
8
9i2c = busio.I2C(board.SCL, board.SDA)
10
11veml = adafruit_veml6075.VEML6075(i2c, integration_time=100)
12
13print("Integration time: %d ms" % veml.integration_time)
14
15while True:
16 print(veml.uv_index)
17 time.sleep(1)