Simple test

Ensure your device works with this simple test.

examples/veml7700_simpletest.py
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
import time
import board
import busio
import adafruit_veml7700

i2c = busio.I2C(board.SCL, board.SDA)
veml7700 = adafruit_veml7700.VEML7700(i2c)

while True:
    print("Ambient light:", veml7700.light)
    time.sleep(0.1)