From 70bb5995afc975a002e73f73ea8f0164b3e8082f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20=C3=81ngel=20S=C3=A1nchez?= Date: Sat, 24 Oct 2020 19:13:00 +0100 Subject: [PATCH] Initialize sensors values --- src/webserver.ino | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/webserver.ino b/src/webserver.ino index aeb0c62..526a081 100644 --- a/src/webserver.ino +++ b/src/webserver.ino @@ -39,6 +39,13 @@ void setup() pinMode(Constants::ledPin, OUTPUT); + // First sensors reads to initialize values + for (int i = 0; i < 5; i++) + { + g_thermistor.read(); + g_photoresistor.read(); + } + /** * @brief Connect to WiFi. */