Skip to content

Commit 0e40f9f

Browse files
author
brentru
committed
update every SENSOR_READ_TIME
1 parent fe659e2 commit 0e40f9f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Adafruit_IO_Power_Relay/code_light_sensor.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ def on_relay_msg(client, topic, value):
146146
# Poll for new messages on feed_relay
147147
client.loop()
148148
now = time.monotonic()
149-
if now - start_time > 3.0:
149+
if now - start_time > SENSOR_READ_TIME:
150150
# Read light sensor
151151
print("Reading light sensor")
152152
sensor_value = sensor.lux

0 commit comments

Comments
 (0)