From 8b27094401ba5897e43ccc6b48dd746101252f9d Mon Sep 17 00:00:00 2001 From: jimmy Date: Fri, 12 Jul 2024 12:06:54 -0500 Subject: [PATCH 1/1] changed threshold for lux_val to trigger on reading. installed hardware on garage wall, distance_cm set accurately, but lightsensor in different place on wall from where initially measured lux vals. updated on pico via 'rshell -e nano' command. --- distanceLux.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/distanceLux.py b/distanceLux.py index 5203a73..8125d35 100644 --- a/distanceLux.py +++ b/distanceLux.py @@ -38,9 +38,9 @@ def distance(): def measure(): global lux_val lux_val = veml.read_lux() - if lux_val<=24: + if lux_val<=4: lux_val=0 - if lux_val >= 25: + if lux_val >= 5: lux_val=1 return(lux_val) -- 2.47.3