From 92cbbe1d2fa2a4f72f8c33733ecb40a8aee973f6 Mon Sep 17 00:00:00 2001 From: Craig Oates Date: Mon, 11 Jan 2021 10:48:33 +0000 Subject: [PATCH] change condition of light levels to switch on greater than 48. The light meter readings changed when new a Light Meter (factory2) was installed (new components). The change produces different light levels (don't know why but probably different components). This change accounts for the new levels and the light which is controlled by this code now turns on when it receives a reading greater than 48. This seems to be the baseline light level in the welding booth (in Ritherdon, the factory) -- after monitoring the readings for a period of time. --- relay.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/relay.py b/relay.py index 344245e..dfa48b9 100644 --- a/relay.py +++ b/relay.py @@ -33,7 +33,7 @@ def main(): # print(data) # For testing. the_reading = data.get("reading") # print(the_reading) # For testing. - if the_reading > 33: + if the_reading > 48: # Print for testing. # print(f"[INFO] Light is on -- {the_reading}.") GPIO.output(relay_pin, GPIO.HIGH)