From 699a70ff4e39eb4d2fd56a4499a5fd938db7f265 Mon Sep 17 00:00:00 2001 From: Steven Baltakatei Sandoval Date: Mon, 19 Apr 2021 00:12:42 +0000 Subject: [PATCH 1/1] fix(examples):Add delay to throw away bad initial sensor reading --- examples/all-in-one-enviro-mini-bk.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/examples/all-in-one-enviro-mini-bk.py b/examples/all-in-one-enviro-mini-bk.py index 5a3dc82..dd0d58a 100755 --- a/examples/all-in-one-enviro-mini-bk.py +++ b/examples/all-in-one-enviro-mini-bk.py @@ -402,8 +402,10 @@ try: # schedule.every().minute.at(":45").do(updateBuffer) # schedule.every().minute.at(":50").do(updateBuffer) # schedule.every().minute.at(":55").do(updateBuffer) + pollSensors() # initial run to start up sensors + time.sleep(1) # pause to give sensors time to initialize updateBuffer() # initial run - pollSensors() # initial run + while True: proximity = ltr559.get_proximity() -- 2.30.2