{"id":5144,"date":"2026-04-06T15:29:56","date_gmt":"2026-04-06T06:29:56","guid":{"rendered":"https:\/\/www.freelifemakers.org\/wordpress\/?p=5144"},"modified":"2026-04-06T15:54:36","modified_gmt":"2026-04-06T06:54:36","slug":"arduinoesp32-temt-6000-webdashboard","status":"publish","type":"post","link":"https:\/\/www.freelifemakers.org\/wordpress\/index.php\/2026\/04\/06\/arduinoesp32-temt-6000-webdashboard\/","title":{"rendered":"[Arduino]ESP32-TEMT-6000 \uc6f9 \ub300\uc2dc\ubcf4\ub4dc\/web dashboard"},"content":{"rendered":"\n<p>\ud83d\udc49\ud83c\udffb \uc8fc\uc704\ud658\uacbd\uc774 \uc5b4\ub450\uc6b0\uba74 ESP32\ubcf4\ub4dc\uc758 LED\uac00 \uc810\ub4f1\ub418\uace0 TEMT-6000\uc13c\uc11c\uc5d0 \ube5b\uc744 \ube44\ucd94\uba74 LED\uac00 \uc18c\ub4f1\ub429\ub2c8\ub2e4.<br>When the surrounding environment is dark, the LED on the ESP32 board lights up, and when light is shone on the TEMT-6000 sensor, the LED turns off.<\/p>\n\n\n\n<p>\ud83d\udc49\ud83c\udffb \uc6f9 \ub300\uc2dc\ubcf4\ub4dc\uc5d0 \uc811\uc18d\ud574\uc11c \uc870\ub3c4 \uae30\uc900 \uac12\uc744 \ubcc0\uacbd\ud574\uc11c LED\ub97c \uc18c\ub4f1\uc2dc\ud0ac \uc218 \uc788\uc2b5\ub2c8\ub2e4.<br>You can turn off the LED by accessing the web dashboard and changing the illuminance threshold value.<\/p>\n\n\n\n<p>\ud83d\udc49\ud83c\udffb \ubc30\uc120\uc740 \uae30\uc874\uacfc \ub3d9\uc77c\ud569\ub2c8\ub2e4.<br>The wiring is the same as the existing one.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>S \u2192 ESP32 ADC \ud540(\uc608 GPIO34) \/ ESP32 ADC pin (e.g., GPIO34)\nG \u2192 GND\nV \u2192 3.3V<\/code><\/pre>\n\n\n\n<p>\ud83d\udc49\ud83c\udffb \ucf54\ub4dc \/ Code<\/p>\n\n\n\n<p>\u2714\ufe0f \uc544\ub450\uc774\ub178 IDE \uc124\uc815\uc740 \uae30\uc874\uacfc \ub3d9\uc77c\ud569\ub2c8\ub2e4.<br>The Arduino IDE settings are the same as before.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>#include &lt;WiFi.h&gt;\n#include &lt;WebServer.h&gt;\n\nconst char* ssid = \"YOUR_SSID\";\nconst char* password = \"YOUR_PASSWORD\";\n\nWebServer server(80);\n\nconst int sensorPin = 34;   \/\/ TEMT6000 S \uc5f0\uacb0 (ADC1) \/ The TEMT6000 S is connected to ADC1.\nconst int ledPin = 2;       \/\/ WROOM \uc628\ubcf4\ub4dc LED \ubcf4\ud1b5 GPIO2 \/ The WROOM on-board LED is usually GPIO2.\n\nint threshold = 1000;       \/\/ \uc774 \uac12\ubcf4\ub2e4 \uc5b4\ub450\uc6b0\uba74 LED ON \/ If it is darker than this value, the LED turns on. (0~4095)\nint sensorValue = 0;\nbool ledOn = false;\n\nvoid handleRoot() {\n  String html = \"&lt;!doctype html&gt;&lt;html&gt;&lt;head&gt;&lt;meta charset='utf-8'&gt;\";\n  html += \"&lt;meta name='viewport' content='width=device-width,initial-scale=1'&gt;\";\n  html += \"&lt;title&gt;ESP32 Light Dashboard&lt;\/title&gt;&lt;\/head&gt;&lt;body&gt;\";\n  html += \"&lt;h2&gt;ESP32 Light Dashboard&lt;\/h2&gt;\";\n  html += \"&lt;p&gt;Sensor: &lt;span id='v'&gt;-&lt;\/span&gt;&lt;\/p&gt;\";\n  html += \"&lt;p&gt;LED: &lt;span id='l'&gt;-&lt;\/span&gt;&lt;\/p&gt;\";\n  html += \"&lt;p&gt;Threshold: &lt;span id='t'&gt;-&lt;\/span&gt;&lt;\/p&gt;\";\n  html += \"&lt;form action='\/set' method='get'&gt;\";\n  html += \"Set threshold: &lt;input name='th' type='number' min='0' max='4095' value='\" + String(threshold) + \"'&gt;\";\n  html += \"&lt;button type='submit'&gt;Apply&lt;\/button&gt;&lt;\/form&gt;\";\n  html += \"&lt;script&gt;\";\n  html += \"async function refresh(){\";\n  html += \"const r=await fetch('\/data'); const d=await r.json();\";\n  html += \"document.getElementById('v').textContent=d.sensor;\";\n  html += \"document.getElementById('l').textContent=d.led?'ON':'OFF';\";\n  html += \"document.getElementById('t').textContent=d.threshold;\";\n  html += \"}\";\n  html += \"setInterval(refresh,1000); refresh();\";\n  html += \"&lt;\/script&gt;&lt;\/body&gt;&lt;\/html&gt;\";\n  server.send(200, \"text\/html\", html);\n}\n\nvoid handleData() {\n  String json = \"{\\\"sensor\\\":\" + String(sensorValue) +\n                \",\\\"threshold\\\":\" + String(threshold) +\n                \",\\\"led\\\":\" + String(ledOn ? \"true\" : \"false\") + \"}\";\n  server.send(200, \"application\/json\", json);\n}\n\nvoid handleSet() {\n  if (server.hasArg(\"th\")) {\n    int t = server.arg(\"th\").toInt();\n    if (t &gt;= 0 &amp;&amp; t &lt;= 4095) threshold = t;\n  }\n  server.sendHeader(\"Location\", \"\/\");\n  server.send(302, \"text\/plain\", \"OK\");\n}\n\nvoid setup() {\n  Serial.begin(115200);\n  pinMode(ledPin, OUTPUT);\n\n  WiFi.begin(ssid, password);\n  while (WiFi.status() != WL_CONNECTED) { delay(500); }\n\n  Serial.print(\"IP: \");\n  Serial.println(WiFi.localIP());\n\n  server.on(\"\/\", handleRoot);\n  server.on(\"\/data\", handleData);\n  server.on(\"\/set\", handleSet);\n  server.begin();\n}\n\nvoid loop() {\n  server.handleClient();\n\n  sensorValue = analogRead(sensorPin);\n  ledOn = (sensorValue &lt; threshold); \/\/ \uc5b4\ub450\uc6b0\uba74 ON \/ If it is darker than the threshold, turn on the LED.\n\n  digitalWrite(ledPin, ledOn ? HIGH : LOW);\n  delay(100);\n}\n<\/code><\/pre>\n\n\n\n<p>\ud83d\udc49\ud83c\udffb \uc704\uc758 \ucf54\ub4dc\ub97c \uc5c5\ub85c\ub4dc\ud558\uace0 Serial Monitor\ub97c \uc5f4\uba74 \uc544\ub798\ucc98\ub7fc ESP32 \ubcf4\ub4dc\uc758 \uc544\uc774\ud53c \uc8fc\uc18c\uac00 \ucd9c\ub825\ub429\ub2c8\ub2e4.<br>If you upload the code above and open the Serial Monitor, the IP address of the ESP32 board will be displayed as shown below.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"640\" src=\"https:\/\/www.freelifemakers.org\/wordpress\/wp-content\/uploads\/2026\/04\/serialMonitor-1024x640.jpg\" alt=\"\" class=\"wp-image-5145\" srcset=\"https:\/\/www.freelifemakers.org\/wordpress\/wp-content\/uploads\/2026\/04\/serialMonitor-1024x640.jpg 1024w, https:\/\/www.freelifemakers.org\/wordpress\/wp-content\/uploads\/2026\/04\/serialMonitor-300x188.jpg 300w, https:\/\/www.freelifemakers.org\/wordpress\/wp-content\/uploads\/2026\/04\/serialMonitor-768x480.jpg 768w, https:\/\/www.freelifemakers.org\/wordpress\/wp-content\/uploads\/2026\/04\/serialMonitor-400x250.jpg 400w, https:\/\/www.freelifemakers.org\/wordpress\/wp-content\/uploads\/2026\/04\/serialMonitor-800x500.jpg 800w, https:\/\/www.freelifemakers.org\/wordpress\/wp-content\/uploads\/2026\/04\/serialMonitor.jpg 1164w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><figcaption class=\"wp-element-caption\">Serial Monitor<\/figcaption><\/figure>\n\n\n\n<p>\ud83d\udc49\ud83c\udffb \uc6f9 \ub300\uc2dc\ubcf4\ub4dc\uc5d0 \uc811\uc18d\ud558\uba74 \uc544\ub798\ucc98\ub7fc \uc870\ub3c4 \uae30\uc900 \uac12(threshold)\uc744 \ubcc0\uacbd\ud574\uc11c ESP32\ubcf4\ub4dc\uc758 LED\ub97c \uc810\ub4f1 \uc2dc\ud0a4\uac70\ub098 \uc18c\ub4f1\uc2dc\ud0ac \uc218 \uc788\uc2b5\ub2c8\ub2e4.<br>When you access the web dashboard, you can turn the ESP32 board&#8217;s LED on or off by changing the illuminance threshold value as shown below.<\/p>\n\n\n\n<p>\u2714\ufe0f \uc6f9 \ub300\uc2dc\ubcf4\ub4dc \/ web dashboard<\/p>\n\n\n\n<figure class=\"wp-block-gallery has-nested-images columns-default is-cropped wp-block-gallery-1 is-layout-flex wp-block-gallery-is-layout-flex\">\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"720\" height=\"584\" data-id=\"5149\" src=\"https:\/\/www.freelifemakers.org\/wordpress\/wp-content\/uploads\/2026\/04\/http-LedOff.jpg\" alt=\"\" class=\"wp-image-5149\" srcset=\"https:\/\/www.freelifemakers.org\/wordpress\/wp-content\/uploads\/2026\/04\/http-LedOff.jpg 720w, https:\/\/www.freelifemakers.org\/wordpress\/wp-content\/uploads\/2026\/04\/http-LedOff-300x243.jpg 300w, https:\/\/www.freelifemakers.org\/wordpress\/wp-content\/uploads\/2026\/04\/http-LedOff-400x324.jpg 400w\" sizes=\"auto, (max-width: 720px) 100vw, 720px\" \/><figcaption class=\"wp-element-caption\">Off<\/figcaption><\/figure>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"834\" height=\"640\" data-id=\"5150\" src=\"https:\/\/www.freelifemakers.org\/wordpress\/wp-content\/uploads\/2026\/04\/http-LedOn.jpg\" alt=\"\" class=\"wp-image-5150\" srcset=\"https:\/\/www.freelifemakers.org\/wordpress\/wp-content\/uploads\/2026\/04\/http-LedOn.jpg 834w, https:\/\/www.freelifemakers.org\/wordpress\/wp-content\/uploads\/2026\/04\/http-LedOn-300x230.jpg 300w, https:\/\/www.freelifemakers.org\/wordpress\/wp-content\/uploads\/2026\/04\/http-LedOn-768x589.jpg 768w, https:\/\/www.freelifemakers.org\/wordpress\/wp-content\/uploads\/2026\/04\/http-LedOn-400x307.jpg 400w, https:\/\/www.freelifemakers.org\/wordpress\/wp-content\/uploads\/2026\/04\/http-LedOn-800x614.jpg 800w\" sizes=\"auto, (max-width: 834px) 100vw, 834px\" \/><figcaption class=\"wp-element-caption\">On<\/figcaption><\/figure>\n<\/figure>\n\n\n\n<p>\u2714\ufe0f ESP32<\/p>\n\n\n\n<figure class=\"wp-block-gallery has-nested-images columns-default is-cropped wp-block-gallery-2 is-layout-flex wp-block-gallery-is-layout-flex\">\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"600\" height=\"800\" data-id=\"5152\" src=\"https:\/\/www.freelifemakers.org\/wordpress\/wp-content\/uploads\/2026\/04\/ESP32-LedOff-jpg-2.jpg\" alt=\"\" class=\"wp-image-5152\" srcset=\"https:\/\/www.freelifemakers.org\/wordpress\/wp-content\/uploads\/2026\/04\/ESP32-LedOff-jpg-2.jpg 600w, https:\/\/www.freelifemakers.org\/wordpress\/wp-content\/uploads\/2026\/04\/ESP32-LedOff-jpg-2-225x300.jpg 225w, https:\/\/www.freelifemakers.org\/wordpress\/wp-content\/uploads\/2026\/04\/ESP32-LedOff-jpg-2-400x533.jpg 400w\" sizes=\"auto, (max-width: 600px) 100vw, 600px\" \/><figcaption class=\"wp-element-caption\">Led Off<\/figcaption><\/figure>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"600\" height=\"800\" data-id=\"5153\" src=\"https:\/\/www.freelifemakers.org\/wordpress\/wp-content\/uploads\/2026\/04\/ESP32-LedOn-jpg-2.jpg\" alt=\"\" class=\"wp-image-5153\" srcset=\"https:\/\/www.freelifemakers.org\/wordpress\/wp-content\/uploads\/2026\/04\/ESP32-LedOn-jpg-2.jpg 600w, https:\/\/www.freelifemakers.org\/wordpress\/wp-content\/uploads\/2026\/04\/ESP32-LedOn-jpg-2-225x300.jpg 225w, https:\/\/www.freelifemakers.org\/wordpress\/wp-content\/uploads\/2026\/04\/ESP32-LedOn-jpg-2-400x533.jpg 400w\" sizes=\"auto, (max-width: 600px) 100vw, 600px\" \/><figcaption class=\"wp-element-caption\">Led On<\/figcaption><\/figure>\n<\/figure>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\ud83d\udc49\ud83c\udffb \uc8fc\uc704\ud658\uacbd\uc774 \uc5b4\ub450\uc6b0\uba74 ESP32\ubcf4\ub4dc\uc758 LED\uac00 \uc810\ub4f1\ub418\uace0 TEMT-6000\uc13c\uc11c\uc5d0 \ube5b\uc744 \ube44\ucd94\uba74 LED\uac00 \uc18c\ub4f1\ub429\ub2c8\ub2e4.When the surrounding environment is dark, the LED on the ESP32 board lights up, and when light is shone on the TEMT-6000 sensor, the LED turns off. \ud83d\udc49\ud83c\udffb \uc6f9 \ub300\uc2dc\ubcf4\ub4dc\uc5d0 \uc811\uc18d\ud574\uc11c \uc870\ub3c4 \uae30\uc900 \uac12\uc744 \ubcc0\uacbd\ud574\uc11c LED\ub97c \uc18c\ub4f1\uc2dc\ud0ac \uc218 \uc788\uc2b5\ub2c8\ub2e4.You can turn off the LED by [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[22,1],"tags":[],"class_list":["post-5144","post","type-post","status-publish","format-standard","hentry","category-arduino","category-uncategorized","missing-thumbnail"],"_links":{"self":[{"href":"https:\/\/www.freelifemakers.org\/wordpress\/index.php\/wp-json\/wp\/v2\/posts\/5144","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.freelifemakers.org\/wordpress\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.freelifemakers.org\/wordpress\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.freelifemakers.org\/wordpress\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.freelifemakers.org\/wordpress\/index.php\/wp-json\/wp\/v2\/comments?post=5144"}],"version-history":[{"count":12,"href":"https:\/\/www.freelifemakers.org\/wordpress\/index.php\/wp-json\/wp\/v2\/posts\/5144\/revisions"}],"predecessor-version":[{"id":5162,"href":"https:\/\/www.freelifemakers.org\/wordpress\/index.php\/wp-json\/wp\/v2\/posts\/5144\/revisions\/5162"}],"wp:attachment":[{"href":"https:\/\/www.freelifemakers.org\/wordpress\/index.php\/wp-json\/wp\/v2\/media?parent=5144"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.freelifemakers.org\/wordpress\/index.php\/wp-json\/wp\/v2\/categories?post=5144"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.freelifemakers.org\/wordpress\/index.php\/wp-json\/wp\/v2\/tags?post=5144"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}