From cc418fa74c7956b2dc131cb5282435f48d30c48b Mon Sep 17 00:00:00 2001 From: Siwat Sirichai Date: Wed, 4 Oct 2023 03:06:44 +0700 Subject: [PATCH] update temp and humid on lcd --- src/espmega_iot_core.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/espmega_iot_core.cpp b/src/espmega_iot_core.cpp index 5e99b26..9e3156a 100644 --- a/src/espmega_iot_core.cpp +++ b/src/espmega_iot_core.cpp @@ -746,6 +746,16 @@ void publish_env_state() mqtt_client.loop(); mqtt.publish(String(AC_HUMIDITY_TOPIC), String(env_sensor.getHumidity())); mqtt_client.loop(); + if(lcd_current_page==4) { + Serial.print("roomtemp.txt=\""); + Serial.print(env_sensor.getTemperature()); + Serial.print("C\""); + lcd_send_stop_bit(); + Serial.print("roomhumid.txt=\""); + Serial.print(env_sensor.getHumidity()); + Serial.print("%\""); + lcd_send_stop_bit(); + } break; default: mqtt.publish(String(AC_ROOM_TEMPERATURE_TOPIC), "ERROR");