1
0
Fork 0
Browse Source

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.
unstable
Craig Oates 3 years ago
parent
commit
92cbbe1d2f
  1. 2
      relay.py

2
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)