From 3257de9de64684353f8a99f795720b26fc4b74be Mon Sep 17 00:00:00 2001 From: Alexandre B Date: Tue, 16 Jul 2024 18:41:37 -0400 Subject: [PATCH] . --- ESP32-C3-sm_I2C/src/main.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ESP32-C3-sm_I2C/src/main.cpp b/ESP32-C3-sm_I2C/src/main.cpp index b5a82702e..8c223862b 100644 --- a/ESP32-C3-sm_I2C/src/main.cpp +++ b/ESP32-C3-sm_I2C/src/main.cpp @@ -33,12 +33,12 @@ void TaskStatusLEDCode (void* parameters) { void TaskLightsAutoCode(void* parameters) { for (;;) { - // If lights are dark, then turn lights ON and increase delay interval - if (light_sensor_reading > 1000) { + // If lighting is dark, then turn lights ON and increase delay interval + if (light_sensor_reading > 1500) { digitalWrite(LIGHTS_PIN, HIGH); vTaskDelay(pdMS_TO_TICKS(10000)); } - // If lights are bright, then turn lights OFF and decrease delay interval + // If lighting is bright, then turn lights OFF and decrease delay interval else { digitalWrite(LIGHTS_PIN, LOW); vTaskDelay(pdMS_TO_TICKS(1000));