Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Soft reset for this sensor #25

Open
TinManAkshay opened this issue Apr 12, 2023 · 1 comment
Open

Soft reset for this sensor #25

TinManAkshay opened this issue Apr 12, 2023 · 1 comment

Comments

@TinManAkshay
Copy link

TinManAkshay commented Apr 12, 2023

Hi all -

I've been using this sensor for a while now without any issues. Recently I came across an issue where sensor was providing regular Lux values and randomly, sensor was just stuck at one value. In other words, Lux value doesn't at all. I was wondering if there is a way to reset a sensor or soft reboot in the code in a scenario like when sensor doesn't give any new value. I'd appreciate all the possibilities.

Thanks,
Akshay

@tekktrik
Copy link
Member

Does toggling the light_shutdown property have any effect? It's the shutdown but not sure if it is what you're looking for:

import time
import board
import adafruit_veml7700

i2c = board.I2C()  # uses board.SCL and board.SDA
# i2c = board.STEMMA_I2C()  # For using the built-in STEMMA QT connector on a microcontroller
veml7700 = adafruit_veml7700.VEML7700(i2c)

veml7700.light_shutdown = True
time.sleep(0.1)
veml7700.light_shutdown = False

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants