From: Steven Baltakatei Sandoval Date: Mon, 19 Apr 2021 00:12:42 +0000 (+0000) Subject: fix(examples):Add delay to throw away bad initial sensor reading X-Git-Url: https://zdv2.bktei.com/gitweb/EVA-2020-02-2.git/commitdiff_plain/699a70ff4e39eb4d2fd56a4499a5fd938db7f265?hp=f0613e570ac423997b56da25d336132926ecc2ee fix(examples):Add delay to throw away bad initial sensor reading --- 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()