{"id":82052,"date":"2024-10-29T23:50:49","date_gmt":"2024-10-30T03:50:49","guid":{"rendered":"https:\/\/www.engineersgarage.com\/?p=82052"},"modified":"2024-11-01T14:24:02","modified_gmt":"2024-11-01T18:24:02","slug":"how-to-build-a-smart-clock-that-measures-temperature-and-humidity","status":"publish","type":"post","link":"https:\/\/www.engineersgarage.com\/how-to-build-a-smart-clock-that-measures-temperature-and-humidity\/","title":{"rendered":"How to build a smart clock that measures temperature and humidity"},"content":{"rendered":"<p>These smart clocks, powered by the ESP8266 D1 Mini, offer more than just timekeeping. In addition to displaying the current time, they measure temperature and humidity, making them versatile tools for monitoring environmental conditions.<\/p>\n<p>Equipped with a DHT22 sensor, these clocks provide accurate air temperature and humidity readings, displayed alongside the time on a 1.8-inch TFT LCD screen. Below we&#8217;ll cover how to design your own smart clock!<\/p>\n<div id=\"attachment_82053\" style=\"width: 575px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/www.engineersgarage.com\/wp-content\/uploads\/2024\/10\/Figure-1.-Prototype-Image.jpg\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-82053\" class=\" wp-image-82053\" src=\"https:\/\/www.engineersgarage.com\/wp-content\/uploads\/2024\/10\/Figure-1.-Prototype-Image-1024x771.jpg\" alt=\"\" width=\"565\" height=\"425\" srcset=\"https:\/\/www.engineersgarage.com\/wp-content\/uploads\/2024\/10\/Figure-1.-Prototype-Image-1024x771.jpg 1024w, https:\/\/www.engineersgarage.com\/wp-content\/uploads\/2024\/10\/Figure-1.-Prototype-Image-300x226.jpg 300w, https:\/\/www.engineersgarage.com\/wp-content\/uploads\/2024\/10\/Figure-1.-Prototype-Image-768x578.jpg 768w, https:\/\/www.engineersgarage.com\/wp-content\/uploads\/2024\/10\/Figure-1.-Prototype-Image-316x238.jpg 316w, https:\/\/www.engineersgarage.com\/wp-content\/uploads\/2024\/10\/Figure-1.-Prototype-Image.jpg 1094w\" sizes=\"auto, (max-width: 565px) 100vw, 565px\" \/><\/a><p id=\"caption-attachment-82053\" class=\"wp-caption-text\"><strong>Figure 1.<\/strong> The prototype.<\/p><\/div>\n<p><span data-preserver-spaces=\"true\">Thanks to the ESP8266&#8217;s network capabilities, this <\/span><span data-preserver-spaces=\"true\">smart<\/span><span data-preserver-spaces=\"true\"> clock retrieves the date, time, temperature, and humidity, providing essential data all in one place. These features make it practical and easy to use.<\/span><\/p>\n<h3><strong><span data-preserver-spaces=\"true\">Components<\/span><\/strong><\/h3>\n<ol>\n<li><span data-preserver-spaces=\"true\">ESP8266 D1 mini board<\/span><\/li>\n<li><span data-preserver-spaces=\"true\">DHT22 sensor<\/span><\/li>\n<li><span data-preserver-spaces=\"true\">A 1.8-inch TFT LCD screen (ST7735 chipset)<\/span><\/li>\n<li><span data-preserver-spaces=\"true\">A 560-ohm resistor<\/span><\/li>\n<\/ol>\n<p><em><span data-preserver-spaces=\"true\">Note:<\/span><\/em><span data-preserver-spaces=\"true\"> If your ESP8266 board lacks a BOOT button, you may need to connect the GPIO0 to the GND by using the 560-ohm resistor (unless the code uploads automatically).<\/span><\/p>\n<div id=\"attachment_82054\" style=\"width: 578px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/www.engineersgarage.com\/wp-content\/uploads\/2024\/10\/Figure-2.-The-components.jpg\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-82054\" class=\"wp-image-82054 \" src=\"https:\/\/www.engineersgarage.com\/wp-content\/uploads\/2024\/10\/Figure-2.-The-components-1024x745.jpg\" alt=\"\" width=\"568\" height=\"413\" srcset=\"https:\/\/www.engineersgarage.com\/wp-content\/uploads\/2024\/10\/Figure-2.-The-components-1024x745.jpg 1024w, https:\/\/www.engineersgarage.com\/wp-content\/uploads\/2024\/10\/Figure-2.-The-components-300x218.jpg 300w, https:\/\/www.engineersgarage.com\/wp-content\/uploads\/2024\/10\/Figure-2.-The-components-768x559.jpg 768w, https:\/\/www.engineersgarage.com\/wp-content\/uploads\/2024\/10\/Figure-2.-The-components-327x238.jpg 327w, https:\/\/www.engineersgarage.com\/wp-content\/uploads\/2024\/10\/Figure-2.-The-components.jpg 1124w\" sizes=\"auto, (max-width: 568px) 100vw, 568px\" \/><\/a><p id=\"caption-attachment-82054\" class=\"wp-caption-text\"><strong>Figure 2.<\/strong> The components.<\/p><\/div>\n<h3><strong>How it works<\/strong><\/h3>\n<p>The ESP8266 D1 Mini connects to the network, requesting the time and date from an NTP server. The server then sends this data to the ESP8266 D1 Mini.<\/p>\n<div id=\"attachment_82056\" style=\"width: 572px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/www.engineersgarage.com\/wp-content\/uploads\/2024\/10\/Figure-3.-How-it-wors.png\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-82056\" class=\" wp-image-82056\" src=\"https:\/\/www.engineersgarage.com\/wp-content\/uploads\/2024\/10\/Figure-3.-How-it-wors-1024x711.png\" alt=\"\" width=\"562\" height=\"390\" srcset=\"https:\/\/www.engineersgarage.com\/wp-content\/uploads\/2024\/10\/Figure-3.-How-it-wors-1024x711.png 1024w, https:\/\/www.engineersgarage.com\/wp-content\/uploads\/2024\/10\/Figure-3.-How-it-wors-300x208.png 300w, https:\/\/www.engineersgarage.com\/wp-content\/uploads\/2024\/10\/Figure-3.-How-it-wors-768x533.png 768w, https:\/\/www.engineersgarage.com\/wp-content\/uploads\/2024\/10\/Figure-3.-How-it-wors-343x238.png 343w, https:\/\/www.engineersgarage.com\/wp-content\/uploads\/2024\/10\/Figure-3.-How-it-wors.png 1418w\" sizes=\"auto, (max-width: 562px) 100vw, 562px\" \/><\/a><p id=\"caption-attachment-82056\" class=\"wp-caption-text\"><strong>Figure 3.<\/strong> The working principle.<\/p><\/div>\n<h3><strong>How to install and set-up Arduino IDE<\/strong><\/h3>\n<ol>\n<li>Download and install Arduino IDE &#8212; ideally Version 1.8.19 (the newer versions may have bugs).<\/li>\n<li>After installing, go to &#8220;File&#8221; &gt; &#8220;Preferences.&#8221;<\/li>\n<li>In the &#8220;Preferences&#8221; window, find &#8220;Additional Boards Manager URLs&#8221; and paste this link: <a href=\"http:\/\/arduino.esp8266.com\/stable\/package_esp8266com_index.json\">http:\/\/arduino.esp8266.com\/stable\/package_esp8266com_index.json<\/a><\/li>\n<li>Next, go to &#8220;Tools&#8221; &gt; &#8220;Board&#8221; &gt; &#8220;Boards Manager.&#8221;<\/li>\n<li>In the &#8220;Boards Manager&#8221; window, type &#8220;esp8266&#8221; in the search field.<\/li>\n<li>Find the ESP826 boards package and click &#8220;Install.&#8221;<\/li>\n<\/ol>\n<div id=\"attachment_82057\" style=\"width: 602px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/www.engineersgarage.com\/wp-content\/uploads\/2024\/10\/Figure-4.-Screenshots-for-reference.png\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-82057\" class=\" wp-image-82057\" src=\"https:\/\/www.engineersgarage.com\/wp-content\/uploads\/2024\/10\/Figure-4.-Screenshots-for-reference-1024x326.png\" alt=\"\" width=\"592\" height=\"188\" srcset=\"https:\/\/www.engineersgarage.com\/wp-content\/uploads\/2024\/10\/Figure-4.-Screenshots-for-reference-1024x326.png 1024w, https:\/\/www.engineersgarage.com\/wp-content\/uploads\/2024\/10\/Figure-4.-Screenshots-for-reference-300x96.png 300w, https:\/\/www.engineersgarage.com\/wp-content\/uploads\/2024\/10\/Figure-4.-Screenshots-for-reference-768x245.png 768w, https:\/\/www.engineersgarage.com\/wp-content\/uploads\/2024\/10\/Figure-4.-Screenshots-for-reference-1536x489.png 1536w, https:\/\/www.engineersgarage.com\/wp-content\/uploads\/2024\/10\/Figure-4.-Screenshots-for-reference-368x117.png 368w, https:\/\/www.engineersgarage.com\/wp-content\/uploads\/2024\/10\/Figure-4.-Screenshots-for-reference.png 1676w\" sizes=\"auto, (max-width: 592px) 100vw, 592px\" \/><\/a><p id=\"caption-attachment-82057\" class=\"wp-caption-text\"><strong>Figure 4.<\/strong> Screenshots for reference.<\/p><\/div>\n<h3><strong>How to download the CH340 driver<\/strong><\/h3>\n<p><strong>For Windows:<\/strong><\/p>\n<ol>\n<li>Download the CH340 driver from this link:<br \/>\n<a href=\"http:\/\/wiki.amperka.ru\/_media\/articles:driver-ch340:ch340ser-wimdows.zip\">http:\/\/wiki.amperka.ru\/_media\/articles:driver-ch340:ch340ser-wimdows.zip<\/a><\/li>\n<li>Extract the downloaded .zip file.<\/li>\n<li>Open the extracted folder.<\/li>\n<li>Run the .exe file and follow the installation prompts.<\/li>\n<\/ol>\n<p><strong>For Mac:<\/strong><\/p>\n<ol>\n<li>Download the CH340 driver from this link:<br \/>\n<a href=\"http:\/\/wiki.amperka.ru\/_media\/articles:driver-ch340:ch340ser-mac.zip\">http:\/\/wiki.amperka.ru\/_media\/articles:driver-ch340:ch340ser-mac.zip<\/a><\/li>\n<li>Extract the downloaded .zip file.<\/li>\n<li>Open the extracted folder.<\/li>\n<li>Install the driver as per the instructions provided.<\/li>\n<\/ol>\n<div id=\"attachment_82058\" style=\"width: 686px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/www.engineersgarage.com\/wp-content\/uploads\/2024\/10\/Screenshot-2024-10-28-at-3.30.58\u202fPM.png\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-82058\" class=\"size-full wp-image-82058\" src=\"https:\/\/www.engineersgarage.com\/wp-content\/uploads\/2024\/10\/Screenshot-2024-10-28-at-3.30.58\u202fPM.png\" alt=\"\" width=\"676\" height=\"448\" srcset=\"https:\/\/www.engineersgarage.com\/wp-content\/uploads\/2024\/10\/Screenshot-2024-10-28-at-3.30.58\u202fPM.png 676w, https:\/\/www.engineersgarage.com\/wp-content\/uploads\/2024\/10\/Screenshot-2024-10-28-at-3.30.58\u202fPM-300x199.png 300w, https:\/\/www.engineersgarage.com\/wp-content\/uploads\/2024\/10\/Screenshot-2024-10-28-at-3.30.58\u202fPM-359x238.png 359w\" sizes=\"auto, (max-width: 676px) 100vw, 676px\" \/><\/a><p id=\"caption-attachment-82058\" class=\"wp-caption-text\"><strong>Figure 5.<\/strong> Installing the CH340 driver.<\/p><\/div>\n<h3><strong>How to install the libraries<\/strong><\/h3>\n<ol>\n<li>Go to &#8220;Sketch&#8221; &gt; &#8220;Include Library&#8221; &gt; &#8220;Manage Libraries.&#8221;<\/li>\n<li>Search for each library one by one and download them:\n<ul>\n<li>DHT<\/li>\n<li>SPI<\/li>\n<li>ESP8266WiFi<\/li>\n<li>NTPClient<\/li>\n<li>Adafruit_ST7735<\/li>\n<li>Adafruit_GFX<\/li>\n<li>WiFiUdp<\/li>\n<\/ul>\n<\/li>\n<\/ol>\n<h3><strong>How to download the firmware<\/strong><\/h3>\n<ol>\n<li>Go to the Smart Clocks GitHub repository: <a href=\"https:\/\/github.com\/NickProgrammerOffical\/Smart-Clocks\">https:\/\/github.com\/NickProgrammerOffical\/Smart-Clocks<\/a><\/li>\n<li>Download the &#8220;Smart-Clocks.zip&#8221; folder.<\/li>\n<li>Extract the downloaded folder.<\/li>\n<li>Open the &#8220;Firmware.ino&#8221; file using the Arduino IDE.<\/li>\n<\/ol>\n<div id=\"attachment_82060\" style=\"width: 750px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/www.engineersgarage.com\/wp-content\/uploads\/2024\/10\/Screenshot-2024-10-28-at-3.33.16\u202fPM.png\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-82060\" class=\"wp-image-82060 size-large\" src=\"https:\/\/www.engineersgarage.com\/wp-content\/uploads\/2024\/10\/Screenshot-2024-10-28-at-3.33.16\u202fPM-1024x544.png\" alt=\"\" width=\"740\" height=\"393\" srcset=\"https:\/\/www.engineersgarage.com\/wp-content\/uploads\/2024\/10\/Screenshot-2024-10-28-at-3.33.16\u202fPM-1024x544.png 1024w, https:\/\/www.engineersgarage.com\/wp-content\/uploads\/2024\/10\/Screenshot-2024-10-28-at-3.33.16\u202fPM-300x159.png 300w, https:\/\/www.engineersgarage.com\/wp-content\/uploads\/2024\/10\/Screenshot-2024-10-28-at-3.33.16\u202fPM-768x408.png 768w, https:\/\/www.engineersgarage.com\/wp-content\/uploads\/2024\/10\/Screenshot-2024-10-28-at-3.33.16\u202fPM-368x195.png 368w, https:\/\/www.engineersgarage.com\/wp-content\/uploads\/2024\/10\/Screenshot-2024-10-28-at-3.33.16\u202fPM.png 1066w\" sizes=\"auto, (max-width: 740px) 100vw, 740px\" \/><\/a><p id=\"caption-attachment-82060\" class=\"wp-caption-text\"><strong>Figure 6.<\/strong> Screenshot for reference.<\/p><\/div>\n<h3><strong>Setting the time zone and format<\/strong><\/h3>\n<ol>\n<li>Find your city&#8217;s GMT offset for its proper time zone.<\/li>\n<li>Adjust the &#8220;int GMT&#8221; value in the code to match your city&#8217;s GMT offset.<\/li>\n<li>Choose your time display format:\n<ul>\n<li>For 24-hour format, set &#8220;display_time&#8221; to &#8220;24\/H&#8221;.<\/li>\n<li>For AM\/PM format, set &#8220;display_time&#8221; to &#8220;AM\/PM&#8221;.\\\\<\/li>\n<\/ul>\n<\/li>\n<\/ol>\n<div id=\"attachment_82061\" style=\"width: 571px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/www.engineersgarage.com\/wp-content\/uploads\/2024\/10\/Figure-7.-The-time.png\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-82061\" class=\" wp-image-82061\" src=\"https:\/\/www.engineersgarage.com\/wp-content\/uploads\/2024\/10\/Figure-7.-The-time.png\" alt=\"\" width=\"561\" height=\"553\" srcset=\"https:\/\/www.engineersgarage.com\/wp-content\/uploads\/2024\/10\/Figure-7.-The-time.png 866w, https:\/\/www.engineersgarage.com\/wp-content\/uploads\/2024\/10\/Figure-7.-The-time-300x296.png 300w, https:\/\/www.engineersgarage.com\/wp-content\/uploads\/2024\/10\/Figure-7.-The-time-768x757.png 768w, https:\/\/www.engineersgarage.com\/wp-content\/uploads\/2024\/10\/Figure-7.-The-time-241x238.png 241w\" sizes=\"auto, (max-width: 561px) 100vw, 561px\" \/><\/a><p id=\"caption-attachment-82061\" class=\"wp-caption-text\"><strong>Figure 7.<\/strong> Setting the time.<\/p><\/div>\n<h3><strong>The assembly<\/strong><\/h3>\n<p>Ensure that the connection between the DHT22 sensor and resistors is secure and done correctly.<\/p>\n<div id=\"attachment_82063\" style=\"width: 560px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/www.engineersgarage.com\/wp-content\/uploads\/2024\/10\/Figure-8.jpg\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-82063\" class=\" wp-image-82063\" src=\"https:\/\/www.engineersgarage.com\/wp-content\/uploads\/2024\/10\/Figure-8-1024x956.jpg\" alt=\"\" width=\"550\" height=\"513\" srcset=\"https:\/\/www.engineersgarage.com\/wp-content\/uploads\/2024\/10\/Figure-8-1024x956.jpg 1024w, https:\/\/www.engineersgarage.com\/wp-content\/uploads\/2024\/10\/Figure-8-300x280.jpg 300w, https:\/\/www.engineersgarage.com\/wp-content\/uploads\/2024\/10\/Figure-8-768x717.jpg 768w, https:\/\/www.engineersgarage.com\/wp-content\/uploads\/2024\/10\/Figure-8-255x238.jpg 255w, https:\/\/www.engineersgarage.com\/wp-content\/uploads\/2024\/10\/Figure-8.jpg 1294w\" sizes=\"auto, (max-width: 550px) 100vw, 550px\" \/><\/a><p id=\"caption-attachment-82063\" class=\"wp-caption-text\"><strong>Figure 8.<\/strong> The circuit connections.<\/p><\/div>\n<h3><strong>Updating the firmware<\/strong><\/h3>\n<ol>\n<li>Update the WIFI_SSID and WIFI_PASS values with your Wi-Fi network&#8217;s SSID and password.<\/li>\n<li>Select the board and port for uploading the firmware.<\/li>\n<li>Go to &#8220;Tools&#8221; &gt; &#8220;Board&#8221; &gt; &#8220;ESP8266 Boards&#8221; &gt; &#8220;LOLIN(WEMOS) D1 mini.&#8221;<\/li>\n<li>Connect GPIO0 to the GND pin using a 560 ohm resistor.<\/li>\n<li>Go to &#8220;Tools&#8221; &gt; &#8220;Port&#8221; and select your port.<\/li>\n<li>Click the upload button in the top left corner to upload the firmware.<\/li>\n<\/ol>\n<div id=\"attachment_82062\" style=\"width: 538px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/www.engineersgarage.com\/wp-content\/uploads\/2024\/10\/Figure-9.-The-working-prototype.jpg\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-82062\" class=\" wp-image-82062\" src=\"https:\/\/www.engineersgarage.com\/wp-content\/uploads\/2024\/10\/Figure-9.-The-working-prototype-831x1024.jpg\" alt=\"\" width=\"528\" height=\"651\" srcset=\"https:\/\/www.engineersgarage.com\/wp-content\/uploads\/2024\/10\/Figure-9.-The-working-prototype-831x1024.jpg 831w, https:\/\/www.engineersgarage.com\/wp-content\/uploads\/2024\/10\/Figure-9.-The-working-prototype-243x300.jpg 243w, https:\/\/www.engineersgarage.com\/wp-content\/uploads\/2024\/10\/Figure-9.-The-working-prototype-768x946.jpg 768w, https:\/\/www.engineersgarage.com\/wp-content\/uploads\/2024\/10\/Figure-9.-The-working-prototype-193x238.jpg 193w, https:\/\/www.engineersgarage.com\/wp-content\/uploads\/2024\/10\/Figure-9.-The-working-prototype.jpg 904w\" sizes=\"auto, (max-width: 528px) 100vw, 528px\" \/><\/a><p id=\"caption-attachment-82062\" class=\"wp-caption-text\"><strong>Figure 9.<\/strong> A working prototype.<\/p><\/div>\n<h3><strong>Using the smart clock<\/strong><\/h3>\n<p>To use the smart clock, you&#8217;ll need a hotspot or Wi-Fi router. The ESP8266 board will automatically connect to the network and retrieve the date and time.<\/p>\n<p><strong>Final Code<\/strong><\/p>\n<style>\n.gist-data{    height:250px; \/\/ Any height    overflow: auto;<br \/>}<\/style>\n<p><script src=\"https:\/\/gist.github.com\/Ajak58a\/fe8843bb3b785e6484e069ecba724307.js\"><\/script><\/p>\n","protected":false},"excerpt":{"rendered":"<p>These smart clocks, powered by the ESP8266 D1 Mini, offer more than just timekeeping. In addition to displaying the current time, they measure temperature and humidity, making them versatile tools for monitoring environmental conditions. Equipped with a DHT22 sensor, these clocks provide accurate air temperature and humidity readings, displayed alongside the time on a 1.8-inch&hellip;<\/p>\n","protected":false},"author":409,"featured_media":82105,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"_genesis_hide_title":false,"_genesis_hide_breadcrumbs":false,"_genesis_hide_singular_image":false,"_genesis_hide_footer_widgets":false,"_genesis_custom_body_class":"","_genesis_custom_post_class":"","_genesis_layout":"","footnotes":""},"categories":[31],"tags":[429,4497,2012,1325,70,4577,748],"class_list":{"2":"type-post","15":"entry","16":"has-post-thumbnail"},"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v25.2 (Yoast SEO v25.2) - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Build a smart clock that measures temperature and humidity<\/title>\n<meta name=\"description\" content=\"These smart clocks, powered by the ESP8266 D1 Mini, display the time, date, and measure the temperature and humidity.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.engineersgarage.com\/how-to-build-a-smart-clock-that-measures-temperature-and-humidity\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to build a smart clock that measures temperature and humidity\" \/>\n<meta property=\"og:description\" content=\"These smart clocks, powered by the ESP8266 D1 Mini, display the time, date, and measure the temperature and humidity.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.engineersgarage.com\/how-to-build-a-smart-clock-that-measures-temperature-and-humidity\/\" \/>\n<meta property=\"og:site_name\" content=\"Engineers Garage\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/engineersgarage\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.engineersgarage.com\/wp-content\/uploads\/2024\/10\/Figure-9.-The-working-prototype-1.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"904\" \/>\n\t<meta property=\"og:image:height\" content=\"1114\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Ayush Jain\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@EngineersGarage\" \/>\n<meta name=\"twitter:site\" content=\"@EngineersGarage\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Ayush Jain\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"5 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/www.engineersgarage.com\/how-to-build-a-smart-clock-that-measures-temperature-and-humidity\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.engineersgarage.com\/how-to-build-a-smart-clock-that-measures-temperature-and-humidity\/\"},\"author\":{\"name\":\"Ayush Jain\",\"@id\":\"https:\/\/www.engineersgarage.com\/#\/schema\/person\/f5e457ba68d983ca6ce696db9b2304b9\"},\"headline\":\"How to build a smart clock that measures temperature and humidity\",\"datePublished\":\"2024-10-30T03:50:49+00:00\",\"dateModified\":\"2024-11-01T18:24:02+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.engineersgarage.com\/how-to-build-a-smart-clock-that-measures-temperature-and-humidity\/\"},\"wordCount\":694,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/www.engineersgarage.com\/#organization\"},\"image\":{\"@id\":\"https:\/\/www.engineersgarage.com\/how-to-build-a-smart-clock-that-measures-temperature-and-humidity\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.engineersgarage.com\/wp-content\/uploads\/2024\/10\/Figure-9.-The-working-prototype-1.jpg\",\"keywords\":[\"circuit\",\"circuitdesign\",\"esp8266\",\"humidity\",\"sensor\",\"smartclock\",\"temperature\"],\"articleSection\":[\"Circuit Design\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/www.engineersgarage.com\/how-to-build-a-smart-clock-that-measures-temperature-and-humidity\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.engineersgarage.com\/how-to-build-a-smart-clock-that-measures-temperature-and-humidity\/\",\"url\":\"https:\/\/www.engineersgarage.com\/how-to-build-a-smart-clock-that-measures-temperature-and-humidity\/\",\"name\":\"Build a smart clock that measures temperature and humidity\",\"isPartOf\":{\"@id\":\"https:\/\/www.engineersgarage.com\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.engineersgarage.com\/how-to-build-a-smart-clock-that-measures-temperature-and-humidity\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/www.engineersgarage.com\/how-to-build-a-smart-clock-that-measures-temperature-and-humidity\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.engineersgarage.com\/wp-content\/uploads\/2024\/10\/Figure-9.-The-working-prototype-1.jpg\",\"datePublished\":\"2024-10-30T03:50:49+00:00\",\"dateModified\":\"2024-11-01T18:24:02+00:00\",\"description\":\"These smart clocks, powered by the ESP8266 D1 Mini, display the time, date, and measure the temperature and humidity.\",\"breadcrumb\":{\"@id\":\"https:\/\/www.engineersgarage.com\/how-to-build-a-smart-clock-that-measures-temperature-and-humidity\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.engineersgarage.com\/how-to-build-a-smart-clock-that-measures-temperature-and-humidity\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.engineersgarage.com\/how-to-build-a-smart-clock-that-measures-temperature-and-humidity\/#primaryimage\",\"url\":\"https:\/\/www.engineersgarage.com\/wp-content\/uploads\/2024\/10\/Figure-9.-The-working-prototype-1.jpg\",\"contentUrl\":\"https:\/\/www.engineersgarage.com\/wp-content\/uploads\/2024\/10\/Figure-9.-The-working-prototype-1.jpg\",\"width\":904,\"height\":1114},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.engineersgarage.com\/how-to-build-a-smart-clock-that-measures-temperature-and-humidity\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.engineersgarage.com\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How to build a smart clock that measures temperature and humidity\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.engineersgarage.com\/#website\",\"url\":\"https:\/\/www.engineersgarage.com\/\",\"name\":\"Engineers Garage\",\"description\":\"Electronic Projects, Electrical Engineering Resources, Makers Articles and Product News\",\"publisher\":{\"@id\":\"https:\/\/www.engineersgarage.com\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.engineersgarage.com\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/www.engineersgarage.com\/#organization\",\"name\":\"Engineer's Garage - WTWH Media\",\"url\":\"https:\/\/www.engineersgarage.com\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.engineersgarage.com\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/www.engineersgarage.com\/wp-content\/uploads\/2019\/08\/EGlogo.png\",\"contentUrl\":\"https:\/\/www.engineersgarage.com\/wp-content\/uploads\/2019\/08\/EGlogo.png\",\"width\":372,\"height\":52,\"caption\":\"Engineer's Garage - WTWH Media\"},\"image\":{\"@id\":\"https:\/\/www.engineersgarage.com\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/engineersgarage\",\"https:\/\/x.com\/EngineersGarage\",\"https:\/\/www.youtube.com\/channel\/UC0VITh11JSYk-UW7toLebUw\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.engineersgarage.com\/#\/schema\/person\/f5e457ba68d983ca6ce696db9b2304b9\",\"name\":\"Ayush Jain\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.engineersgarage.com\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/7e29cf2f63779dd4d485ccf8638b08081e75b68b0ed80716dceaadda8a0dc40e?s=96&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/7e29cf2f63779dd4d485ccf8638b08081e75b68b0ed80716dceaadda8a0dc40e?s=96&r=g\",\"caption\":\"Ayush Jain\"},\"url\":\"https:\/\/www.engineersgarage.com\/author\/ayush-jain\/\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"Build a smart clock that measures temperature and humidity","description":"These smart clocks, powered by the ESP8266 D1 Mini, display the time, date, and measure the temperature and humidity.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.engineersgarage.com\/how-to-build-a-smart-clock-that-measures-temperature-and-humidity\/","og_locale":"en_US","og_type":"article","og_title":"How to build a smart clock that measures temperature and humidity","og_description":"These smart clocks, powered by the ESP8266 D1 Mini, display the time, date, and measure the temperature and humidity.","og_url":"https:\/\/www.engineersgarage.com\/how-to-build-a-smart-clock-that-measures-temperature-and-humidity\/","og_site_name":"Engineers Garage","article_publisher":"https:\/\/www.facebook.com\/engineersgarage","og_image":[{"width":904,"height":1114,"url":"https:\/\/www.engineersgarage.com\/wp-content\/uploads\/2024\/10\/Figure-9.-The-working-prototype-1.jpg","type":"image\/jpeg"}],"author":"Ayush Jain","twitter_card":"summary_large_image","twitter_creator":"@EngineersGarage","twitter_site":"@EngineersGarage","twitter_misc":{"Written by":"Ayush Jain","Est. reading time":"5 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.engineersgarage.com\/how-to-build-a-smart-clock-that-measures-temperature-and-humidity\/#article","isPartOf":{"@id":"https:\/\/www.engineersgarage.com\/how-to-build-a-smart-clock-that-measures-temperature-and-humidity\/"},"author":{"name":"Ayush Jain","@id":"https:\/\/www.engineersgarage.com\/#\/schema\/person\/f5e457ba68d983ca6ce696db9b2304b9"},"headline":"How to build a smart clock that measures temperature and humidity","datePublished":"2024-10-30T03:50:49+00:00","dateModified":"2024-11-01T18:24:02+00:00","mainEntityOfPage":{"@id":"https:\/\/www.engineersgarage.com\/how-to-build-a-smart-clock-that-measures-temperature-and-humidity\/"},"wordCount":694,"commentCount":0,"publisher":{"@id":"https:\/\/www.engineersgarage.com\/#organization"},"image":{"@id":"https:\/\/www.engineersgarage.com\/how-to-build-a-smart-clock-that-measures-temperature-and-humidity\/#primaryimage"},"thumbnailUrl":"https:\/\/www.engineersgarage.com\/wp-content\/uploads\/2024\/10\/Figure-9.-The-working-prototype-1.jpg","keywords":["circuit","circuitdesign","esp8266","humidity","sensor","smartclock","temperature"],"articleSection":["Circuit Design"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.engineersgarage.com\/how-to-build-a-smart-clock-that-measures-temperature-and-humidity\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.engineersgarage.com\/how-to-build-a-smart-clock-that-measures-temperature-and-humidity\/","url":"https:\/\/www.engineersgarage.com\/how-to-build-a-smart-clock-that-measures-temperature-and-humidity\/","name":"Build a smart clock that measures temperature and humidity","isPartOf":{"@id":"https:\/\/www.engineersgarage.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.engineersgarage.com\/how-to-build-a-smart-clock-that-measures-temperature-and-humidity\/#primaryimage"},"image":{"@id":"https:\/\/www.engineersgarage.com\/how-to-build-a-smart-clock-that-measures-temperature-and-humidity\/#primaryimage"},"thumbnailUrl":"https:\/\/www.engineersgarage.com\/wp-content\/uploads\/2024\/10\/Figure-9.-The-working-prototype-1.jpg","datePublished":"2024-10-30T03:50:49+00:00","dateModified":"2024-11-01T18:24:02+00:00","description":"These smart clocks, powered by the ESP8266 D1 Mini, display the time, date, and measure the temperature and humidity.","breadcrumb":{"@id":"https:\/\/www.engineersgarage.com\/how-to-build-a-smart-clock-that-measures-temperature-and-humidity\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.engineersgarage.com\/how-to-build-a-smart-clock-that-measures-temperature-and-humidity\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.engineersgarage.com\/how-to-build-a-smart-clock-that-measures-temperature-and-humidity\/#primaryimage","url":"https:\/\/www.engineersgarage.com\/wp-content\/uploads\/2024\/10\/Figure-9.-The-working-prototype-1.jpg","contentUrl":"https:\/\/www.engineersgarage.com\/wp-content\/uploads\/2024\/10\/Figure-9.-The-working-prototype-1.jpg","width":904,"height":1114},{"@type":"BreadcrumbList","@id":"https:\/\/www.engineersgarage.com\/how-to-build-a-smart-clock-that-measures-temperature-and-humidity\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.engineersgarage.com\/"},{"@type":"ListItem","position":2,"name":"How to build a smart clock that measures temperature and humidity"}]},{"@type":"WebSite","@id":"https:\/\/www.engineersgarage.com\/#website","url":"https:\/\/www.engineersgarage.com\/","name":"Engineers Garage","description":"Electronic Projects, Electrical Engineering Resources, Makers Articles and Product News","publisher":{"@id":"https:\/\/www.engineersgarage.com\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.engineersgarage.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.engineersgarage.com\/#organization","name":"Engineer's Garage - WTWH Media","url":"https:\/\/www.engineersgarage.com\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.engineersgarage.com\/#\/schema\/logo\/image\/","url":"https:\/\/www.engineersgarage.com\/wp-content\/uploads\/2019\/08\/EGlogo.png","contentUrl":"https:\/\/www.engineersgarage.com\/wp-content\/uploads\/2019\/08\/EGlogo.png","width":372,"height":52,"caption":"Engineer's Garage - WTWH Media"},"image":{"@id":"https:\/\/www.engineersgarage.com\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/engineersgarage","https:\/\/x.com\/EngineersGarage","https:\/\/www.youtube.com\/channel\/UC0VITh11JSYk-UW7toLebUw"]},{"@type":"Person","@id":"https:\/\/www.engineersgarage.com\/#\/schema\/person\/f5e457ba68d983ca6ce696db9b2304b9","name":"Ayush Jain","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.engineersgarage.com\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/7e29cf2f63779dd4d485ccf8638b08081e75b68b0ed80716dceaadda8a0dc40e?s=96&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/7e29cf2f63779dd4d485ccf8638b08081e75b68b0ed80716dceaadda8a0dc40e?s=96&r=g","caption":"Ayush Jain"},"url":"https:\/\/www.engineersgarage.com\/author\/ayush-jain\/"}]}},"featured_image_src":"https:\/\/www.engineersgarage.com\/wp-content\/uploads\/2024\/10\/Figure-9.-The-working-prototype-1-600x400.jpg","featured_image_src_square":"https:\/\/www.engineersgarage.com\/wp-content\/uploads\/2024\/10\/Figure-9.-The-working-prototype-1-600x600.jpg","author_info":{"display_name":"Ayush Jain","author_link":"https:\/\/www.engineersgarage.com\/author\/ayush-jain\/"},"_links":{"self":[{"href":"https:\/\/www.engineersgarage.com\/wp-json\/wp\/v2\/posts\/82052","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.engineersgarage.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.engineersgarage.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.engineersgarage.com\/wp-json\/wp\/v2\/users\/409"}],"replies":[{"embeddable":true,"href":"https:\/\/www.engineersgarage.com\/wp-json\/wp\/v2\/comments?post=82052"}],"version-history":[{"count":0,"href":"https:\/\/www.engineersgarage.com\/wp-json\/wp\/v2\/posts\/82052\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.engineersgarage.com\/wp-json\/wp\/v2\/media\/82105"}],"wp:attachment":[{"href":"https:\/\/www.engineersgarage.com\/wp-json\/wp\/v2\/media?parent=82052"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.engineersgarage.com\/wp-json\/wp\/v2\/categories?post=82052"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.engineersgarage.com\/wp-json\/wp\/v2\/tags?post=82052"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}