{"id":18834,"date":"2022-04-15T00:00:05","date_gmt":"2022-04-14T16:00:05","guid":{"rendered":"https:\/\/techclass.wfjydl.com\/?p=18834"},"modified":"2022-10-09T13:57:09","modified_gmt":"2022-10-09T05:57:09","slug":"%e7%94%a8esp32%e5%92%8crtc%e5%81%9a%e4%b8%80%e4%b8%aa%e5%94%a4%e9%86%92%e9%97%b9%e9%92%9f%e5%90%a7%ef%bc%81","status":"publish","type":"post","link":"https:\/\/techclass.wfjydl.com\/knowledge\/tech-info\/arduino\/lets-make-a-wake-up-alarm-clock-with-esp32-and-rtc","title":{"rendered":"\u7528ESP32\u548cRTC\u505a\u4e00\u4e2a\u201c\u5524\u9192\u95f9\u949f\u201d\u5427\uff01"},"content":{"rendered":"<p><script type=\"text\/javascript\" src=\"https:\/\/ssl-cache.stream.ne.jp\/www50\/eqa194obdo\/jmc_pub\/jmc_swf\/player\/t3\/if.js\" charset=\"UTF-8\"><\/script><\/p>\n<p style=\"text-align: right;\"><span style=\"font-size: xx-small;\">\u6700\u521d\u4e8e2019\u5e7412\u67083\u65e5\u53d1\u5e03<\/span><\/p>\n<p>\u8fd9\u7bc7\u6587\u7ae0\u6765\u6e90\u4e8e<a href=\"https:\/\/www.deviceplus.com\/\">DevicePlus.com<\/a>\u82f1\u8bed\u7f51\u7ad9\u7684\u7ffb\u8bd1\u7a3f\u3002<\/p>\n<p><em>\u672c\u6587\u6700\u521d\u53d1\u5e03\u5728<a href=\"http:\/\/deviceplus.jp\">deviceplus.jp<\/a>\u7f51\u7ad9\u4e0a\uff0c\u800c\u540e\u88ab\u7ffb\u8bd1\u6210\u82f1\u8bed\u3002<\/em><\/p>\n<h2>\u76ee\u5f55<\/h2>\n<ol>\n<li><a href=\"#Introduction\">\u524d\u8a00<\/a><\/li>\n<li><a href=\"#ESP32\">\u5173\u4e8eESP32\u95f9\u949f<\/a><\/li>\n<li><a href=\"#RTC\">\u521b\u5efa\u65e5\u671f\u548c\u65f6\u95f4\u7684\u201cRTC\u201d<\/a><\/li>\n<li><a href=\"#LCD\">\u5728ESP32 LCD\u4e0a\u663e\u793a\u65e5\u671f\u548c\u65f6\u95f4<\/a><\/li>\n<li><a href=\"#MP3\">\u4f7f\u7528MP3\u6a21\u5757\u53d1\u51fa\u95f9\u94c3\u54cd\u58f0<\/a><\/li>\n<li><a href=\"#Wiring\">\u7ed9\u95f9\u949f\u4e3b\u673a\u63a5\u7ebf<\/a><\/li>\n<li><a href=\"#ExtensionWiring\">\u7ed9ESP32\u95f9\u949f\u5206\u673a\u63a5\u7ebf<\/a><\/li>\n<li><a href=\"#Installing\">\u5b89\u88c5\u5e93\u548c\u5b57\u4f53\u6587\u4ef6<\/a><\/li>\n<li><a href=\"#Program\">Arduino IDE\u95f9\u949f\u7a0b\u5e8f<\/a><\/li>\n<li><a href=\"#ExtensionProgram\">\u5206\u673a\u7a0b\u5e8f<\/a><\/li>\n<li><a href=\"#CheckOperation\">\u786e\u8ba4\u8fd0\u884c\u60c5\u51b5<\/a><\/li>\n<li><a href=\"#Conclusion\">\u7ed3\u8bba<\/a><\/li>\n<li><a href=\"#RelatedArticls\">\u76f8\u5173\u6587\u7ae0<\/a><\/li>\n<\/ol>\n<h2 id=\"Introduction\"><strong>\u524d\u8a00<\/strong><\/h2>\n<p>\u60a8\u6bcf\u5929\u65e9\u4e0a\u88ab\u4ec0\u4e48\u95f9\u949f\u5435\u9192\uff1f\u65e9\u4e0a\u4eba\u4eec\u7684\u4e00\u4e2a\u5e38\u89c1\u95ee\u9898\u662f\u5173\u6389\u95f9\u949f\u5e76\u76f4\u63a5\u56de\u53bb\u7761\u89c9\u3002<br \/>\n\u8fd9\u4e00\u6b21\uff0c\u6211\u4eec\u51b3\u5b9a\u4f7f\u7528ESP32\u5236\u4f5c\u4e00\u4e2a\u201c\u5524\u9192\u95f9\u949f\u201d\uff0c\u5e94\u8be5\u6709\u52a9\u4e8e\u89e3\u51b3\u8fd9\u4e2a\u95ee\u9898\u3002<\/p>\n<h5><strong>\u8bbe\u8ba1\u6b65\u9aa4<\/strong><\/h5>\n<p>\u9884\u8ba1\u5b8c\u6210\u65f6\u95f4\uff1a120\u5206\u949f<\/p>\n<table>\n<tbody>\n<tr>\n<td><b>\u540d\u79f0<\/b><\/td>\n<td><b>\u5356\u65b9<\/b><\/td>\n<td><b>\u4ef7\u683c<\/b><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400;\">ESP32-DevKitC(2 \u4ef6)<\/span><\/td>\n<td><span style=\"font-weight: 400;\">\u8d38\u6cfd\u7535\u5b50<\/span><\/td>\n<td><span style=\"font-weight: 400;\">\u7ea610.00\u7f8e\u5143<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400;\">DS3231 \u6a21\u5757<\/span><\/td>\n<td><span style=\"font-weight: 400;\">\u4e9a\u9a6c\u900a<\/span><\/td>\n<td><span style=\"font-weight: 400;\">\u7ea63.00\u7f8e\u5143<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400;\">LIR2032\uff08\u7ebd\u6263\u5145\u7535\u7535\u6c60\uff09<\/span><\/td>\n<td><span style=\"font-weight: 400;\">\u4e9a\u9a6c\u900a<\/span><\/td>\n<td><span style=\"font-weight: 400;\">\u7ea63.60\u7f8e\u5143<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400;\">\u626c\u58f0\u5668<\/span><\/td>\n<td><span style=\"font-weight: 400;\">\u4e9a\u9a6c\u900a<\/span><\/td>\n<td><span style=\"font-weight: 400;\">\u7ea61.00~3.00\u7f8e\u5143<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400;\">2.8\u82f1\u5bf8SPI\u8fde\u63a5\u5668 320\u00d7240\u50cf\u7d20LCD\u5c4f\u5e55<\/span><\/td>\n<td><span style=\"font-weight: 400;\">\u4e9a\u9a6c\u900a<\/span><\/td>\n<td><span style=\"font-weight: 400;\">\u7ea615.00\u7f8e\u5143<\/span><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>*\u9664\u4e0a\u8ff0\u7269\u54c1\u5916\uff0c\u8fd8\u9700\u8981\u4e00\u4e2a\u8f7b\u89e6\u5f00\u5173\u3001\u4e00\u4e2aLED\u548c\u4e00\u4e2a\u7ea6100\u03a9\u7684\u7535\u963b\u5668\u3002<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-8656\" src=\"https:\/\/www.deviceplus.com\/wp-content\/uploads\/2019\/11\/wake-up-alarm-ESP32-1.png\" sizes=\"auto, (max-width: 700px) 100vw, 700px\" srcset=\"https:\/\/www.deviceplus.com\/wp-content\/uploads\/2019\/11\/wake-up-alarm-ESP32-1.png 700w, https:\/\/www.deviceplus.com\/wp-content\/uploads\/2019\/11\/wake-up-alarm-ESP32-1-300x176.png 300w, https:\/\/www.deviceplus.com\/wp-content\/uploads\/2019\/11\/wake-up-alarm-ESP32-1-249x146.png 249w, https:\/\/www.deviceplus.com\/wp-content\/uploads\/2019\/11\/wake-up-alarm-ESP32-1-50x29.png 50w, https:\/\/www.deviceplus.com\/wp-content\/uploads\/2019\/11\/wake-up-alarm-ESP32-1-128x75.png 128w\" alt=\"use ESP32 to make a wake up alarm clock\" width=\"700\" height=\"411\" \/><\/p>\n<h2 id=\"ESP32\"><strong>\u5173\u4e8eESP32\u95f9\u949f<\/strong><\/h2>\n<p>\u6211\u4eec\u6765\u4f7f\u7528ESP32\u5b8c\u6210\u4e00\u4e2a\u76ee\u6807\u5427\uff1a\u50cf\u666e\u901a\u95f9\u949f\u4e00\u6837\u5728\u5c4f\u5e55\u4e0a\u663e\u793a\u65e5\u671f\u548c\u65f6\u95f4\uff0c\u5e76\u5728\u6307\u5b9a\u7684\u65f6\u95f4\u54cd\u8d77\u3002\u5728\u8bbe\u8ba1\u5236\u4f5c\u8fd9\u6b3e\u201c\u5524\u9192\u95f9\u949f\u201d\u65f6\uff0c\u6211\u4eec\u9700\u8981\u5c06\u5206\u673a\u6309\u94ae\uff08\u7528\u4e8e\u5173\u95ed\u95f9\u949f\uff09\u4e0e\u95f9\u949f\u4e3b\u673a\u5206\u5f00\u653e\u7f6e\u3002\u4e4b\u6240\u4ee5\u8fd9\u6837\u8bbe\u8ba1\uff0c\u662f\u56e0\u4e3a\u60f3\u8981\u60a8\u5fc5\u987b\u8d77\u5e8a\u5e76\u8d70\u5230\u5206\u673a\u6309\u94ae\u5904\u624d\u80fd\u5c06\u95f9\u949f\u5173\u6389\u3002<\/p>\n<p>\u5982\u4e0b\u9762\u7684\u89c6\u9891\u6240\u793a\uff0c\u4f7f\u7528\u4e24\u4e2aESP\uff0c\u4e00\u4e2a\u7528\u4e8e\u4e3b\u673a\uff0c\u53e6\u4e00\u4e2a\u7528\u4e8e\u5206\u673a\u3002\u5728\u89c6\u9891\u4e2d\uff0c\u4e3b\u673a\u548c\u5206\u673a\u662f\u6328\u7740\u7684\uff0c\u4f46\u5982\u679c\u901a\u8fc7Wi-Fi\u8fde\u63a5\uff0c\u5b83\u4eec\u662f\u53ef\u4ee5\u5728Wi-Fi\u8303\u56f4\u5185\u5206\u5f00\u653e\u7f6e\u7684\u3002<\/p>\n<p><script type=\"text\/javascript\">\n\tjstream_t3.PlayerFactoryIF.create({\n\tb:\"eqa194obdo.eq.webcdn.stream.ne.jp\/www50\/eqa194obdo\/jmc_pub\/jmc_swf\/player\/\",\n\tc:\"NDc3\",\n\tm:\"MTQ1Mg==\",\n\ts:{\n\t\thp:360,\n\t\til:\"off\",\n\t\trb:\"off\",\n\t\tsn:\"f,t,g\",\n\t\twp:640\n\t}});\n<\/script><\/p>\n<p>\u5c06\u4e3b\u673a\u548c\u5206\u673a\u5206\u5f00\u653e\u7f6e\u65f6\uff0c\u8bf7\u4f7f\u7528ESP32\u7684Wi-Fi\u529f\u80fd\u3002\u4e24\u4e2aESP32\u4f5c\u4e3aWeb\u670d\u52a1\u5668\u548c\u5ba2\u6237\u7aef\u8fd0\u884c\uff0c\u5e76\u76f8\u4e92\u901a\u4fe1\uff0c\u5982\u56fe1\u6240\u793a\u3002<\/p>\n<div id=\"attachment_8657\" class=\"wp-caption aligncenter\" style=\"width: 510px;\">\n<p><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-8657\" src=\"https:\/\/www.deviceplus.com\/wp-content\/uploads\/2019\/11\/wake-up-alarm-ESP32-2.jpg\" sizes=\"auto, (max-width: 500px) 100vw, 500px\" srcset=\"https:\/\/www.deviceplus.com\/wp-content\/uploads\/2019\/11\/wake-up-alarm-ESP32-2.jpg 500w, https:\/\/www.deviceplus.com\/wp-content\/uploads\/2019\/11\/wake-up-alarm-ESP32-2-300x229.jpg 300w, https:\/\/www.deviceplus.com\/wp-content\/uploads\/2019\/11\/wake-up-alarm-ESP32-2-191x146.jpg 191w, https:\/\/www.deviceplus.com\/wp-content\/uploads\/2019\/11\/wake-up-alarm-ESP32-2-50x38.jpg 50w, https:\/\/www.deviceplus.com\/wp-content\/uploads\/2019\/11\/wake-up-alarm-ESP32-2-98x75.jpg 98w\" alt=\"use ESP32 Wi-Fi function\" width=\"500\" height=\"382\" aria-describedby=\"caption-attachment-8657\" \/><\/p>\n<p id=\"caption-attachment-8657\" class=\"wp-caption-text\">\u56fe 1 \u4e3b\u673a\u548c\u5206\u673a\u4e4b\u95f4\u7684\u901a\u4fe1<\/p>\n<\/div>\n<h2 id=\"RTC\"><strong>\u521b\u5efa\u65e5\u671f\u548c\u65f6\u95f4\u7684\u201cRTC\u201d<\/strong><\/h2>\n<p>\u5bf9\u4e8eArduino\u7b49\u5fae\u63a7\u5236\u5668\u6765\u8bf4\uff0c\u901a\u5e38\u80fd\u591f\u83b7\u53d6\u5728\u542f\u52a8\u7a0b\u5e8f\u540e\u7ecf\u8fc7\u7684\u65f6\u95f4\u3002\u4f46\u662f\uff0c\u60a8\u83b7\u5f97\u7684\u65f6\u95f4\u901a\u5e38\u4e0d\u662f\u5f88\u51c6\u786e\uff0c\u56e0\u4e3a\u65ad\u7535\u65f6\u4f1a\u91cd\u7f6e\u7ecf\u8fc7\u65f6\u95f4\u3002<\/p>\n<p>\u800c\u5982\u679c\u4f7f\u7528ESP32\uff0c\u5219\u53ef\u4ee5\u901a\u8fc7Wi-Fi\u8fde\u63a5\u5230\u4e92\u8054\u7f51\uff0c\u4ee5\u5b9a\u671f\u4ece\u4e92\u8054\u7f51\u4e0a\u7684NTP\u670d\u52a1\u5668\u83b7\u53d6\u65e5\u671f\u548c\u65f6\u95f4\uff0c\u5e76\u5c06\u5176\u8bbe\u7f6e\u5230ESP32\u4e0a\u3002\u4f46Arduino Uno\u7b49\u90e8\u5206\u5fae\u63a7\u5236\u5668\u6ca1\u6709\u4e92\u8054\u7f51\u8fde\u63a5\u529f\u80fd\uff0c\u56e0\u6b64\uff0c\u62e5\u6709\u4e00\u79cd\u53ef\u4ee5\u66f4\u8f7b\u677e\u5730\u5904\u7406\u65e5\u671f\u548c\u65f6\u95f4\u7684\u673a\u5236\u4f1a\u5f88\u65b9\u4fbf\u3002<\/p>\n<p>\u8fd9\u5c31\u662f\u4e3a\u4ec0\u4e48\u7ecf\u5e38\u4f7f\u7528\u4e00\u79cd\u88ab\u79f0\u4f5c\u201cRTC\u201d\uff08\u5b9e\u65f6\u65f6\u949f\uff09\u7684IC\u3002 RTC\u662f\u57fa\u4e8e\u5468\u671f\u6027\u53d1\u51fa\u4fe1\u53f7\u7684\u5143\u4ef6\u6765\u8ba1\u65f6\u7684IC\u3002\u6b64\u5916\uff0c\u901a\u8fc7\u5c06\u5176\u8fde\u63a5\u5230\u7535\u6c60\u7b49\u5916\u90e8\u7535\u6e90\uff0c\u5373\u4f7f\u5728\u5fae\u63a7\u5236\u5668\u65ad\u7535\u65f6\u4e5f\u53ef\u4ee5\u7ee7\u7eed\u8ba1\u65f6\u3002<\/p>\n<p>\u8bb8\u591a\u4ea7\u54c1\u90fd\u91c7\u7528RTC\uff0c\u6b64\u6b21\uff0c\u6211\u4eec\u5c06\u4f7f\u7528\u4e00\u79cd\u540d\u4e3a\u201cDS3231\u201d\u7684RTC\u6a21\u5757\u3002<\/p>\n<p>\u5728\u7535\u5b50\u8bbe\u8ba1\u6240\u7528\u7684RTC\u6a21\u5757\u5f53\u4e2d\uff0cDS3231\u6a21\u5757\u5f88\u53d7\u6b22\u8fce\uff0c\u4e14\u5f88\u5bb9\u6613\u83b7\u5f97\u3002\u7531\u4e8e\u63a5\u53e3\u662fI2C\uff0c\u56e0\u6b64\u53ea\u9700\u89814\u6839\u7ebf\u3002\u9664\u4e86RTC\u529f\u80fd\uff0c\u8fd8\u5177\u6709\u6e29\u5ea6\u4f20\u611f\u5668\u529f\u80fd\uff08\u4e0d\u8fc7\u672c\u6587\u4e0d\u4f1a\u7528\u5230\u6e29\u5ea6\u4f20\u611f\u5668\uff09\u3002<\/p>\n<p>\u6b64\u5916\uff0c\u5728\u7167\u72471\u6240\u793a\u7684DS3231\u4e0a\uff0c\u5b89\u88c5\u4e00\u4e2a\u540d\u4e3a\u201cLIR2032\u201d\u7684\u7ebd\u6263\u7535\u6c60\uff0c\u8fd9\u6837\u5373\u4f7f\u5728\u5fae\u63a7\u5236\u5668\u5173\u95ed\u7684\u60c5\u51b5\u4e0b\u4e5f\u80fd\u7ee7\u7eed\u8bb0\u5f55\u65e5\u671f\u548c\u65f6\u95f4\u3002LIR2032\u7684\u7535\u6c60\u5c3a\u5bf8\u4e0eCR2032\u7684\u76f8\u540c\uff0c\u4f46\u4e0d\u540c\u7684\u662f\u5b83\u53ef\u5145\u7535\u3002<\/p>\n<div id=\"attachment_8658\" class=\"wp-caption aligncenter\" style=\"width: 510px;\">\n<p><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-8658\" src=\"https:\/\/www.deviceplus.com\/wp-content\/uploads\/2019\/11\/wake-up-alarm-ESP32-3.jpg\" sizes=\"auto, (max-width: 500px) 100vw, 500px\" srcset=\"https:\/\/www.deviceplus.com\/wp-content\/uploads\/2019\/11\/wake-up-alarm-ESP32-3.jpg 500w, https:\/\/www.deviceplus.com\/wp-content\/uploads\/2019\/11\/wake-up-alarm-ESP32-3-300x158.jpg 300w, https:\/\/www.deviceplus.com\/wp-content\/uploads\/2019\/11\/wake-up-alarm-ESP32-3-260x137.jpg 260w, https:\/\/www.deviceplus.com\/wp-content\/uploads\/2019\/11\/wake-up-alarm-ESP32-3-50x26.jpg 50w, https:\/\/www.deviceplus.com\/wp-content\/uploads\/2019\/11\/wake-up-alarm-ESP32-3-143x75.jpg 143w\" alt=\"RTC real time clock\" width=\"500\" height=\"263\" aria-describedby=\"caption-attachment-8658\" \/><\/p>\n<p id=\"caption-attachment-8658\" class=\"wp-caption-text\">\u7167\u72471 DS3231\u6a21\u5757<\/p>\n<\/div>\n<h2 id=\"LCD\"><strong>\u5728ESP32 LCD\u4e0a\u663e\u793a\u65e5\u671f\u548c\u65f6\u95f4<\/strong><\/h2>\n<p>\u7531\u4e8e\u95f9\u949f\u7528\u4e8e\u67e5\u770b\u5f53\u524d\u65e5\u671f\u548c\u65f6\u95f4\uff0c\u56e0\u6b64\u9700\u8981\u4ee5\u6613\u4e8e\u7406\u89e3\u7684\u65b9\u5f0f\u663e\u793a\u65e5\u671f\u548c\u65f6\u95f4\u3002\u4ee5\u4e0b\u8bbe\u5907\u7528\u4e8e\u663e\u793a\u65e5\u671f\u548c\u65f6\u95f4\u3002<\/p>\n<ul>\n<li>7\u6bb5LED<\/li>\n<li>LED \u77e9\u9635<\/li>\n<li>OLED \u663e\u793a\u5668<\/li>\n<li>\u5b57\u7b26\u6db2\u6676\u663e\u793a\u5668<\/li>\n<li>\u56fe\u5f62\u6db2\u6676\u663e\u793a\u5668<\/li>\n<\/ul>\n<p>\u6839\u636e\u8bbe\u5907\u7684\u4e0d\u540c\uff0c\u6709\u4e0d\u540c\u7684\u5e93\u548c\u4e0d\u540c\u7684\u7f16\u7a0b\u65b9\u6cd5\u3002\u8fd9\u8fd8\u53d6\u51b3\u4e8e\u5b83\u662f\u5426\u9002\u5408\u60a8\u60f3\u8981\u5236\u4f5c\u7684\u4f5c\u54c1\u3002\u4f8b\u5982\uff0c7\u6bb5LED\u4ec5\u9002\u5408\u4ee5\u4f4e\u6210\u672c\u663e\u793a\u6570\u5b57\uff0c\u4f46\u4e0d\u9002\u5408\u663e\u793a\u8be6\u60c5\u3002\u5176\u4e2d\uff0c\u56fe\u5f62\u6db2\u6676\u663e\u793a\u5668\u662f\u6700\u901a\u7528\u7684\uff0c\u53ef\u4ee5\u7528\u4e8e\u8bb8\u591a\u4e0d\u540c\u7684\u9879\u76ee\uff0c\u6240\u4ee5\u6211\u8fd9\u6b21\u51b3\u5b9a\u4f7f\u7528\u5b83\u3002<\/p>\n<p>\u5e02\u9762\u4e0a\u6709\u5404\u79cd\u7c7b\u578b\u7684\u6db2\u6676\u663e\u793a\u5668\u6a21\u5757\uff0c\u4f46\u5bf9\u4e8e\u4eca\u5929\u7684\u9879\u76ee\uff0c\u6211\u4eec\u5c06\u4f7f\u7528\u4e00\u4e2a\u540d\u4e3a\u201cILI9341\u201d\u7684\u63a7\u5236\u5668\uff0c\u5e76\u4f7f\u7528SPI\u63a5\u53e3\uff08\u7167\u72472\uff09\u3002\u6b64\u5916\uff0c\u6db2\u6676\u663e\u793a\u5668\u901a\u5e38\u4ee52.2\u82f1\u5bf8\/2.4\u82f1\u5bf8\/2.8\u82f1\u5bf8\u5c3a\u5bf8\u51fa\u552e\uff0c\u56e0\u6b64\uff0c\u8bf7\u6839\u636e\u60a8\u6b63\u5728\u505a\u7684\u4f5c\u54c1\u7c7b\u578b\u8fdb\u884c\u76f8\u5e94\u8c03\u6574\u3002<\/p>\n<div id=\"attachment_8659\" class=\"wp-caption aligncenter\" style=\"width: 510px;\">\n<p><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-8659\" src=\"https:\/\/www.deviceplus.com\/wp-content\/uploads\/2019\/11\/wake-up-alarm-ESP32-4.jpg\" sizes=\"auto, (max-width: 500px) 100vw, 500px\" srcset=\"https:\/\/www.deviceplus.com\/wp-content\/uploads\/2019\/11\/wake-up-alarm-ESP32-4.jpg 500w, https:\/\/www.deviceplus.com\/wp-content\/uploads\/2019\/11\/wake-up-alarm-ESP32-4-300x225.jpg 300w, https:\/\/www.deviceplus.com\/wp-content\/uploads\/2019\/11\/wake-up-alarm-ESP32-4-195x146.jpg 195w, https:\/\/www.deviceplus.com\/wp-content\/uploads\/2019\/11\/wake-up-alarm-ESP32-4-50x38.jpg 50w, https:\/\/www.deviceplus.com\/wp-content\/uploads\/2019\/11\/wake-up-alarm-ESP32-4-100x75.jpg 100w\" alt=\"LCD display\" width=\"500\" height=\"375\" aria-describedby=\"caption-attachment-8659\" \/><\/p>\n<p id=\"caption-attachment-8659\" class=\"wp-caption-text\">\u7167\u72472 \u63a7\u5236\u5668\u7528ILI9341 2.8\u82f1\u5bf8\u6db2\u6676\u663e\u793a\u5668<\/p>\n<\/div>\n<h2 id=\"MP3\"><strong>\u4f7f\u7528MP3\u6a21\u5757\u53d1\u51fa\u95f9\u949f\u94c3\u58f0<\/strong><\/h2>\n<p>\u65e2\u7136\u662f\u95f9\u949f\uff0c\u5728\u6307\u5b9a\u65f6\u95f4\u53d1\u51fa\u94c3\u58f0\u662f\u5fc5\u9700\u7684\u3002\u60a8\u53ef\u4ee5\u5c06\u8702\u9e23\u5668\u8fde\u63a5\u5230ESP32\u4ee5\u4ea7\u751f\u5355\u4e00\u94c3\u58f0\uff0c\u4f46\u5982\u679c\u60a8\u613f\u610f\uff0c\u4e5f\u53ef\u4ee5\u4f7f\u7528\u81ea\u5df1\u559c\u6b22\u7684\u94c3\u58f0\u3002\u4e3a\u6b64\uff0c\u6211\u4eec\u5c06\u4f7f\u7528\u4e00\u4e2a\u540d\u4e3a\u201cDFPlayer Mini\u201d\u7684\u6a21\u5757\uff0c\u5b83\u53ef\u4ee5\u64ad\u653e\u4efb\u4f55MP3\u6570\u636e\uff08\u7167\u72473\uff09\u3002<br \/>\nDFPlayer Mini\u662f\u4e00\u4e2a\u53ef\u4ee5\u901a\u8fc7\u4e32\u53e3\u53d1\u9001\u547d\u4ee4\u6765\u64ad\u653emicroSD\u5361\u4e2dMP3\u7684\u6a21\u5757\u3002\u53ef\u4ee5\u5c06\u4e00\u4e2a\u5c0f\u578b\u626c\u58f0\u5668\u8fde\u63a5\u5230\u626c\u58f0\u5668\u8f93\u51fa\u5f15\u811a\u4ee5\u4ea7\u751f\u94c3\u58f0\u3002<\/p>\n<div id=\"attachment_8660\" class=\"wp-caption aligncenter\" style=\"width: 510px;\">\n<p><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-8660\" src=\"https:\/\/www.deviceplus.com\/wp-content\/uploads\/2019\/11\/wake-up-alarm-ESP32-5.jpg\" sizes=\"auto, (max-width: 500px) 100vw, 500px\" srcset=\"https:\/\/www.deviceplus.com\/wp-content\/uploads\/2019\/11\/wake-up-alarm-ESP32-5.jpg 500w, https:\/\/www.deviceplus.com\/wp-content\/uploads\/2019\/11\/wake-up-alarm-ESP32-5-296x300.jpg 296w, https:\/\/www.deviceplus.com\/wp-content\/uploads\/2019\/11\/wake-up-alarm-ESP32-5-144x146.jpg 144w, https:\/\/www.deviceplus.com\/wp-content\/uploads\/2019\/11\/wake-up-alarm-ESP32-5-50x50.jpg 50w, https:\/\/www.deviceplus.com\/wp-content\/uploads\/2019\/11\/wake-up-alarm-ESP32-5-74x75.jpg 74w, https:\/\/www.deviceplus.com\/wp-content\/uploads\/2019\/11\/wake-up-alarm-ESP32-5-85x85.jpg 85w, https:\/\/www.deviceplus.com\/wp-content\/uploads\/2019\/11\/wake-up-alarm-ESP32-5-80x80.jpg 80w\" alt=\"DFPlayer Mini to play MP3 in a microSD card\" width=\"500\" height=\"507\" aria-describedby=\"caption-attachment-8660\" \/><\/p>\n<p id=\"caption-attachment-8660\" class=\"wp-caption-text\">\u7167\u72473 DFPlayer Mini<\/p>\n<\/div>\n<h2 id=\"Wiring\"><strong>\u7ed9\u95f9\u949f\u4e3b\u673a\u63a5\u7ebf<\/strong><\/h2>\n<p>\u8ba9\u6211\u4eec\u8fdb\u5165\u5b9e\u9645\u6784\u5efa\u5427\u3002\u9996\u5148\uff0c\u7ed9\u95f9\u949f\u63a5\u7ebf\u3002<\/p>\n<p>\u4f7f\u7528\u4e24\u4e2a\u9762\u5305\u677f\uff0c\u4e00\u4e2a\u914d\u6709ESP32\u548cDS3231\uff0c\u53e6\u4e00\u4e2a\u914d\u6709\u6db2\u6676\u663e\u793a\u5668\uff08LCD\uff09\u548cDFPlayer Mini\u3002\u5404\u90e8\u4ef6\u63a5\u7ebf\u5982\u56fe2\u6240\u793a\u3002<\/p>\n<p>\u7531\u4e8eESP32\u5f88\u5bbd\uff0c\u60a8\u53ea\u80fd\u5728\u666e\u901a\u9762\u5305\u677f\u7684\u4e00\u9762\u653e\u4e00\u6839\u8df3\u7ebf\u3002\u56e0\u6b64\uff0c\u8bf7\u6539\u7528\u7535\u6e90\u7ebf\u53ea\u5728\u4e00\u4fa7\u3001\u591a\u4e00\u6392\u63d2\u5b54\u7684\u9762\u5305\u677f\uff08\u4f8b\u5982Sanhayato\u7684SAD-101\uff09\u3002<\/p>\n<p>ESP32\u548c\u6db2\u6676\u663e\u793a\u5668\u901a\u8fc7SPI\u8fdb\u884c\u8fde\u63a5\u3002ESP32\u53ef\u4ee5\u4f7f\u7528\u4e24\u4e2a SPI\uff08VSPI\u548cHSPI\uff09\uff0c\u4f46\u4f7f\u7528\u7684\u662fVSPI\uff08\u5f15\u811a18\/19\/23\uff09\uff08\u88681\uff09\u3002<\/p>\n<p>ESP32\u548cDS3231\u901a\u8fc7I2C\u8fdb\u884c\u8fde\u63a5\u3002\u5728ESP32\u4e2d\uff0cI2C\u53ef\u4ee5\u5206\u914d\u7ed9\u4efb\u4f55\u5f15\u811a\uff0c\u4f46\u6211\u4eec\u4f7f\u7528\u6807\u51c6\u5f15\u811a\uff08SDA=21\u548cSCL=22\uff09\uff08\u8868 2\uff09\u3002<\/p>\n<p>DFPlayer Mini \u8fdb\u884c\u4e32\u884c\u8fde\u63a5\u3002ESP32\u53ef\u4ee5\u4f7f\u75283\u4e2a\u4e32\u53e3\uff0c\u4f46\u4e3a\u6b64\u8bf7\u540c\u65f6\u4f7f\u7528\u5f15\u811a16\u548c\u5f15\u811a17\uff08\u88683\uff09\u3002\u6b64\u5916\uff0c\u5c06\u626c\u58f0\u5668\u8fde\u63a5\u5230DFPlayer Mini\u201cSPK1\u201d\u548c\u201cSPK2\u201d\u4e24\u4e2a\u5f15\u811a\u3002<\/p>\n<div id=\"attachment_8661\" class=\"wp-caption aligncenter\" style=\"width: 710px;\">\n<p><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-8661\" src=\"https:\/\/www.deviceplus.com\/wp-content\/uploads\/2019\/11\/wake-up-alarm-ESP32-6.jpg\" sizes=\"auto, (max-width: 700px) 100vw, 700px\" srcset=\"https:\/\/www.deviceplus.com\/wp-content\/uploads\/2019\/11\/wake-up-alarm-ESP32-6.jpg 700w, https:\/\/www.deviceplus.com\/wp-content\/uploads\/2019\/11\/wake-up-alarm-ESP32-6-300x220.jpg 300w, https:\/\/www.deviceplus.com\/wp-content\/uploads\/2019\/11\/wake-up-alarm-ESP32-6-199x146.jpg 199w, https:\/\/www.deviceplus.com\/wp-content\/uploads\/2019\/11\/wake-up-alarm-ESP32-6-50x37.jpg 50w, https:\/\/www.deviceplus.com\/wp-content\/uploads\/2019\/11\/wake-up-alarm-ESP32-6-102x75.jpg 102w\" alt=\"wiring alarm clock body\" width=\"700\" height=\"513\" aria-describedby=\"caption-attachment-8661\" \/><\/p>\n<p id=\"caption-attachment-8661\" class=\"wp-caption-text\">\u56fe2 \u95f9\u949f\u4e3b\u673a\u63a5\u7ebf<\/p>\n<\/div>\n<table>\n<tbody>\n<tr>\n<td><b>ESP32 \u5f15\u811a<\/b><\/td>\n<td><b>\u6db2\u6676\u663e\u793a\u5668\u5f15\u811a<\/b><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400;\">5V<\/span><\/td>\n<td><span style=\"font-weight: 400;\">VCC<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400;\">GND<\/span><\/td>\n<td><span style=\"font-weight: 400;\">GND<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400;\">5<\/span><\/td>\n<td><span style=\"font-weight: 400;\">CS<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400;\">4<\/span><\/td>\n<td><span style=\"font-weight: 400;\">RESET<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400;\">2<\/span><\/td>\n<td><span style=\"font-weight: 400;\">DC<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400;\">23<\/span><\/td>\n<td><span style=\"font-weight: 400;\">MOSI<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400;\">18<\/span><\/td>\n<td><span style=\"font-weight: 400;\">SCK<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400;\">19<\/span><\/td>\n<td><span style=\"font-weight: 400;\">MISO<\/span><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p><strong>\u8868 1\uff1aESP32 \u4e0e\u6db2\u6676\u663e\u793a\u5668\u7684\u8fde\u63a5<\/strong><\/p>\n<p>&nbsp;<\/p>\n<table>\n<tbody>\n<tr>\n<td><b>ESP32 \u5f15\u811a<\/b><\/td>\n<td><b>DS3231 \u5f15\u811a<\/b><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400;\">5V<\/span><\/td>\n<td><span style=\"font-weight: 400;\">VCC<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400;\">GND<\/span><\/td>\n<td><span style=\"font-weight: 400;\">GND<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400;\">21<\/span><\/td>\n<td><span style=\"font-weight: 400;\">SDA<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400;\">22<\/span><\/td>\n<td><span style=\"font-weight: 400;\">SCL<\/span><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p><strong>\u8868 2\uff1aESP32\u4e0eDS3231\u7684\u8fde\u63a5<\/strong><\/p>\n<p>&nbsp;<\/p>\n<table>\n<tbody>\n<tr>\n<td><b>ESP32 \u5f15\u811a<\/b><\/td>\n<td><b>DFPlayer Mini \u5f15\u811a<\/b><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400;\">5V<\/span><\/td>\n<td><span style=\"font-weight: 400;\">VCC<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400;\">GND<\/span><\/td>\n<td><span style=\"font-weight: 400;\">GND<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400;\">16<\/span><\/td>\n<td><span style=\"font-weight: 400;\">TX<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400;\">17<\/span><\/td>\n<td><span style=\"font-weight: 400;\">RX<\/span><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p><strong>\u8868 3\uff1aESP32\u4e0eDFPlayer Mini\u7684\u8fde\u63a5<\/strong><\/p>\n<h2 id=\"ExtensionWiring\"><strong>\u7ed9ESP32\u95f9\u949f\u5206\u673a\u63a5\u7ebf<\/strong><\/h2>\n<p>\u63a5\u4e0b\u6765\uff0c\u6211\u4eec\u5c06\u7ed9\u5206\u673a\u63a5\u7ebf\u3002\u5206\u673a\u63a5\u7ebf\u5e94\u6309\u56fe3\u6240\u793a\u8fdb\u884c\u3002\u60a8\u6240\u8981\u505a\u7684\u5c31\u662f\u5c06\u5f00\u5173\u548c LED\u8fde\u63a5\u5230ESP32\u3002\u5c06\u5f00\u5173\u7684\u4e00\u4fa7\u8fde\u63a5\u5230ESP32\u76843V3\u5f15\u811a\uff0c\u53e6\u4e00\u4fa7\u8fde\u63a5\u5230\u5f15\u811a4\u3002\u901a\u8fc7\u7535\u963b\u5668\u2192LED\u518d\u901a\u8fc7ESP32\u7684\u5f15\u811a13\u8fde\u63a5\u5230GND\u3002<\/p>\n<p>\u5728\u8bfb\u53d6\u5f00\u5173\u72b6\u6001\u7684\u7535\u8def\u4e0a\u63d2\u5165\u4e00\u4e2a\u4e0a\u62c9\u7535\u963b\u6216\u4e0b\u62c9\u7535\u963b\u3002\u4f46\u662f\uff0c\u7531\u4e8eESP32\u53ef\u4ee5\u901a\u8fc7\u5185\u90e8\u7535\u963b\u8fdb\u884c\u4e0a\u62c9\/\u4e0b\u62c9\uff0c\u56e0\u6b64\u7701\u7565\u4e86\u5916\u90e8\u7535\u963b\u3002<\/p>\n<div id=\"attachment_8662\" class=\"wp-caption aligncenter\" style=\"width: 710px;\">\n<p><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-8662\" src=\"https:\/\/www.deviceplus.com\/wp-content\/uploads\/2019\/11\/wake-up-alarm-ESP32-7.jpg\" sizes=\"auto, (max-width: 700px) 100vw, 700px\" srcset=\"https:\/\/www.deviceplus.com\/wp-content\/uploads\/2019\/11\/wake-up-alarm-ESP32-7.jpg 700w, https:\/\/www.deviceplus.com\/wp-content\/uploads\/2019\/11\/wake-up-alarm-ESP32-7-300x248.jpg 300w, https:\/\/www.deviceplus.com\/wp-content\/uploads\/2019\/11\/wake-up-alarm-ESP32-7-177x146.jpg 177w, https:\/\/www.deviceplus.com\/wp-content\/uploads\/2019\/11\/wake-up-alarm-ESP32-7-50x41.jpg 50w, https:\/\/www.deviceplus.com\/wp-content\/uploads\/2019\/11\/wake-up-alarm-ESP32-7-91x75.jpg 91w\" alt=\"wiring for the extension\" width=\"700\" height=\"578\" aria-describedby=\"caption-attachment-8662\" \/><\/p>\n<p id=\"caption-attachment-8662\" class=\"wp-caption-text\">\u56fe3 \u5206\u673a\u63a5\u7ebf<\/p>\n<\/div>\n<h2 id=\"Installing\"><strong>\u5b89\u88c5\u5e93\u548c\u5b57\u4f53\u6587\u4ef6<\/strong><\/h2>\n<p>\u5b8c\u6210\u63a5\u7ebf\u5de5\u4f5c\u540e\uff0c\u60a8\u53ef\u4ee5\u521b\u5efa\u7a0b\u5e8f\u3002\u9996\u5148\uff0c\u4ece\u5b89\u88c5\u4e0b\u9762\u7684\u5404\u4e2a\u5e93\u5f00\u59cb\u3002<\/p>\n<ul>\n<li>Adafruit GFX<\/li>\n<li>Adafruit ILI9341<\/li>\n<li>RTCLib<\/li>\n<li>DFRobotDFPlayerMini<\/li>\n<\/ul>\n<p>\u5b89\u88c5\u6b65\u9aa4\u5982\u4e0b\uff1a<\/p>\n<ol>\n<li>\u542f\u52a8Arduino IDE\u3002<\/li>\n<li>\u9009\u62e9\u201cSketch\u201d-&gt;\u201cInclude Library\u201d-&gt;\u201cManage Library\u201d\u83dc\u5355\uff0c\u4ee5\u6253\u5f00Library Manager\u3002<\/li>\n<li>\u5728\u201cFilter search\u201d\u5b57\u6bb5\u4e2d\u8f93\u5165\u201cAdafruit GFX\u201d\u3002<\/li>\n<li>Adafruit GFX\u5c06\u5728\u5e93\u5217\u8868\u4e2d\u663e\u793a\u3002\u5355\u51fb\u201cInstall\u201d\u6309\u94ae\uff08\u56fe 4\uff09\u3002<\/li>\n<li>\u4ee5\u76f8\u540c\u7684\u65b9\u5f0f\u5b89\u88c5\u6bcf\u4e2a\u5e93\u3002<\/li>\n<\/ol>\n<p>\u6709\u51e0\u4e2a\u540d\u79f0\u76f8\u4f3c\u7684RTCLib\u548cDFPlayer\u5e93\u3002RTCLib \u5b89\u88c5\u201cRTCLib by Adafruit\u201d\uff0c\u800cDFPlayer\u5b89\u88c5\u201cDFRobotDFPlayerMini by DFRobot\u201d\u3002<\/p>\n<div id=\"attachment_8663\" class=\"wp-caption aligncenter\" style=\"width: 710px;\">\n<p><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-8663\" src=\"https:\/\/www.deviceplus.com\/wp-content\/uploads\/2019\/11\/wake-up-alarm-ESP32-8.jpg\" sizes=\"auto, (max-width: 700px) 100vw, 700px\" srcset=\"https:\/\/www.deviceplus.com\/wp-content\/uploads\/2019\/11\/wake-up-alarm-ESP32-8.jpg 700w, https:\/\/www.deviceplus.com\/wp-content\/uploads\/2019\/11\/wake-up-alarm-ESP32-8-300x169.jpg 300w, https:\/\/www.deviceplus.com\/wp-content\/uploads\/2019\/11\/wake-up-alarm-ESP32-8-260x146.jpg 260w, https:\/\/www.deviceplus.com\/wp-content\/uploads\/2019\/11\/wake-up-alarm-ESP32-8-50x28.jpg 50w, https:\/\/www.deviceplus.com\/wp-content\/uploads\/2019\/11\/wake-up-alarm-ESP32-8-133x75.jpg 133w\" alt=\"install library and font files\" width=\"700\" height=\"395\" aria-describedby=\"caption-attachment-8663\" \/><\/p>\n<p id=\"caption-attachment-8663\" class=\"wp-caption-text\">\u56fe 4 Adafruit GFX\u5e93\u5b89\u88c5<\/p>\n<\/div>\n<p>\u6b64\u5916\uff0c\u4e3a\u901a\u8fc7\u5927\u5b57\u7b26\u663e\u793a\u65f6\u95f4\uff0c\u9700\u8981\u5b89\u88c5\u5b57\u4f53\u6587\u4ef6\u3002\u5982\u679c\u60a8\u4e0b\u8f7d\u5e76\u89e3\u538b\u7f29\u4ee5\u4e0bzip\u6587\u4ef6\uff0c\u5c06\u53ef\u4ee5\u83b7\u5f97\u4e00\u4e2a\u540d\u4e3a\u201cFreeSans40pt7b.h\u201d\u7684\u6587\u4ef6\u3002<\/p>\n<p>\u6253\u5f00Arduino IDE\u7684\u6807\u51c6\u8349\u56fe\u76ee\u6807\u6587\u4ef6\u5939\uff0c\u518d\u6253\u5f00\u201clibraries\u201d-&gt;\u201cAdafruit_GFX_Library\u201d-&gt;\u201cFonts\u201d\u6587\u4ef6\u5939\uff0c\u5c06\u5b57\u4f53\u6587\u4ef6\u590d\u5236\u5230\u90a3\u91cc\u3002<br \/>\n<a href=\"https:\/\/www.h-fj.com\/deviceplus\/font.zip\" target=\"_blank\" rel=\"noopener noreferrer\">https:\/\/www.h-fj.com\/deviceplus\/font.zip<\/a><\/p>\n<h2 id=\"Program\"><strong>Arduino IDE\u95f9\u949f\u7a0b\u5e8f<\/strong><\/h2>\n<p>\u63a5\u4e0b\u6765\uff0c\u5728Arduino IDE\u4e2d\u521b\u5efa\u4e00\u4e2a\u95f9\u949f\u7a0b\u5e8f\u5e76\u5c06\u5176\u5199\u5165ESP32\u3002\u7a0b\u5e8f\u5185\u5bb9\u5982\u6e05\u53551\u6240\u793a\u3002<\/p>\n<p>\u6e05\u53551\uff1a\u95f9\u949f\u4e3b\u673a\u7a0b\u5e8f<br \/>\n\u7a0b\u5e8f\u5185\u5bb9\uff08\u653e\u5728\u8fd9\u91cc\uff09<\/p>\n<p>\u4f46\u662f\uff0c\u7b2c17\u884c\u5230\u7b2c21\u884c\u9700\u8981\u6539\u5199\u5982\u4e0b\uff1a<\/p>\n<p><em>\u30fb\u7b2c17\uff0f18\u884c<br \/>\n\u6839\u636e\u60a8\u7684Wi-Fi\u8def\u7531\u5668\u7684SSID\/\u5bc6\u7801\u91cd\u5199\u3002<br \/>\n\u30fb\u7b2c19\u884c<br \/>\n\u6307\u5b9a\u8981\u5206\u914d\u7ed9ESS32\u7684IP\u5730\u5740\u3002\u6839\u636e\u60a8\u7684Wi-Fi\u8def\u7531\u5668\u7684\u7f51\u7edc\u914d\u7f6e\u81ea\u884c\u51b3\u5b9aIP\u5730\u5740\u3002<br \/>\n\u5728\u666e\u901aIP\u5730\u5740\u4e2d\uff0c\u56db\u7ec4\u6570\u5b57\u7528\u53e5\u70b9\u5206\u9694\uff0c\u4f46\u5728\u8fd9\u4e00\u884c\u4e2d\uff0c\u5b83\u662f\u51fd\u6570\u53c2\u6570\u7684\u5f62\u5f0f\uff0c\u6240\u4ee5\u56db\u7ec4\u6570\u5b57\u7528\u9017\u53f7\u5206\u9694\u3002<br \/>\n\u30fb\u7b2c20\u884c<br \/>\n\u6307\u5b9a\u7f51\u7edc\u9ed8\u8ba4\u7f51\u5173\u7684IP\u5730\u5740\u3002\u901a\u5e38\uff0c\u5b83\u662fWi-Fi\u8def\u7531\u5668\u7684IP\u5730\u5740\u3002\u7528\u9017\u53f7\u5206\u9694IP\u5730\u5740\u4e2d\u7684\u56db\u7ec4\u6570\u5b57\u3002<br \/>\n\u30fb\u7b2c21\u884c<br \/>\n\u6839\u636e\u5206\u914d\u7ed9\u5206\u673aESP32\u7684IP\u5730\u5740\u91cd\u5199\u3002<\/em><\/p>\n<p>\u4f8b\u5982\uff0c\u5982\u679c\u60a8\u60f3\u6309\u7167\u88684\u6240\u793a\u8fdb\u884c\u8bbe\u7f6e\uff0c\u8bf7\u91cd\u5199\u7b2c17\u884c\u81f3\u7b2c21\u884c\uff0c\u5982\u6e05\u53552\u6240\u793a\u3002<\/p>\n<table>\n<tbody>\n<tr>\n<td><b>\u9879\u76ee<\/b><\/td>\n<td><b>\u8bbe\u5b9a\u503c<\/b><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400;\">Wi-Fi\u8def\u7531\u5668SSID<\/span><\/td>\n<td><span style=\"font-weight: 400;\">my_wifi<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400;\">Wi-Fi\u8def\u7531\u5668\u5bc6\u7801<\/span><\/td>\n<td><span style=\"font-weight: 400;\">my_password<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400;\">\u5206\u914d\u7ed9\u4e3b\u673aESP32\u7684IP\u5730\u5740<\/span><\/td>\n<td><span style=\"font-weight: 400;\">192.168.1.101<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400;\">\u9ed8\u8ba4\u7f51\u5173IP\u5730\u5740<\/span><\/td>\n<td><span style=\"font-weight: 400;\">192.168.1.1<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400;\">\u5206\u914d\u7ed9\u5206\u673aESP32\u7684IP\u5730\u5740<\/span><\/td>\n<td><span style=\"font-weight: 400;\">192.168.1.102<\/span><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p><strong>\u88684\uff1a\u4e3b\u673a\u7f51\u7edc\u8bbe\u7f6e\u793a\u4f8b<\/strong><br \/>\n\u6e05\u5355 2\uff1a\u91cd\u5199\u7b2c17-21\u884c\u7684\u793a\u4f8b<\/p>\n<h2 id=\"ExtensionProgram\"><strong>\u5206\u673a\u7a0b\u5e8f<\/strong><\/h2>\n<p>\u5206\u673a\u7a0b\u5e8f\u5982\u6e05\u53553\u6240\u793a\u3002<\/p>\n<p>\u4ee5\u4e0e\u95f9\u949f\u4e3b\u673a\u76f8\u540c\u7684\u65b9\u5f0f\u91cd\u5199\u7b2c5\u884c\u5230\u7b2c9\u884c\u3002 \u4f46\u662f\uff0c\u5728\u7b2c7\u884c\uff0c\u6307\u5b9a\u5206\u914d\u7ed9\u5206\u673a\u7684IP\u5730\u5740\u3002 \u6b64\u5916\uff0c\u5728\u7b2c9\u884c\u7684\u201cMain console IP address\uff08\u4e3b\u63a7\u53f0IP\u5730\u5740\uff09\u201d\u4e2d\u6307\u5b9a\u95f9\u949f\u7684IP\u5730\u5740\u3002<\/p>\n<p>\u6e05\u5355 3\uff1a\u5206\u673a\u7a0b\u5e8f<\/p>\n<p>\u7a0b\u5e8f\u5185\u5bb9<\/p>\n<div class=\"hcb_wrap\">\n<pre class=\"prism undefined-numbers lang-c\" data-lang=\"C\"><code>\r\n#include\r\n#include\r\n#include\r\n#include &lt;Fonts\/FreeSans12pt7b.h&gt;\r\n#include &lt;Fonts\/FreeSans18pt7b.h&gt;\r\n#include &lt;Fonts\/FreeSans40pt7b.h&gt;\r\n#include\r\n#include\r\n#include \"time.h\"\r\n#include\r\n#include\r\n#include\r\n#include\r\n#include<\/code><\/pre>\n<p>\/\/ Initial setup<br \/>\nconst char *ssid = &#8220;Wi-Fi SSID&#8221;;<br \/>\nconst char *pass = &#8220;Wi-Fi password&#8221;;<br \/>\nIPAddress ip(IP address assigned to main unit);<br \/>\nIPAddress gateway(IP address of default gateway);<br \/>\nconst char* notify_url = &#8220;http:\/\/IP address of extension unit\/alarm&#8221;;<br \/>\nconst char* adjust_time = &#8220;04:00:00&#8221;;<br \/>\n#define DF_VOLUME 30<\/p>\n<pre class=\"prism undefined-numbers lang-c\" data-lang=\"C\"><code><\/code><\/pre>\n<p>\/\/ Constants, etc.<br \/>\n#define ALARM_SIG 25<br \/>\n#define TFT_DC 2<br \/>\n#define TFT_CS 5<br \/>\n#define TFT_RST 4<br \/>\n#define TFT_WIDTH 320<\/p>\n<pre class=\"prism undefined-numbers lang-c\" data-lang=\"C\"><code><\/code><\/pre>\n<p>Adafruit_ILI9341 tft = Adafruit_ILI9341(TFT_CS, TFT_DC, TFT_RST);<br \/>\nRTC_DS3231 rtc;<br \/>\nHardwareSerial hs(1);<br \/>\nDFRobotDFPlayerMini myDFPlayer;<br \/>\nWebServer server(80);<\/p>\n<pre class=\"prism undefined-numbers lang-c\" data-lang=\"C\"><code><\/code><\/pre>\n<p>char old_date[15];<br \/>\nchar old_time[9];<br \/>\nchar old_alarm[15];<br \/>\nchar alarm_time[9];<br \/>\nchar wdays[7][4] = { &#8220;Sun&#8221;, &#8220;Mon&#8221;, &#8220;Tue&#8221;, &#8220;Wed&#8221;, &#8220;Thu&#8221;, &#8220;Fri&#8221;, &#8220;Sat&#8221; };<br \/>\nbool alarm_checked = false;<br \/>\nbool alarm_on = false;<br \/>\nbool ntp_adjusted = false;<br \/>\nint alarm_ctr;<\/p>\n<pre class=\"prism undefined-numbers lang-c\" data-lang=\"C\"><code><\/code><\/pre>\n<p>\/\/ Set date and time using NTP<br \/>\nvoid setTimeByNTP() {<br \/>\nstruct tm t;<\/p>\n<pre class=\"prism undefined-numbers lang-c\" data-lang=\"C\"><code><\/code><\/pre>\n<p>configTime(9 * 3600L, 0, &#8220;ntp.nict.jp&#8221;, &#8220;time.google.com&#8221;, &#8220;ntp.jst.mfeed.ad.jp&#8221;);<\/p>\n<pre class=\"prism undefined-numbers lang-c\" data-lang=\"C\"><code><\/code><\/pre>\n<p>if (!getLocalTime(&amp;t)) {<br \/>\nSerial.println(&#8220;getLocalTime Error&#8221;);<br \/>\nreturn;<br \/>\n}<br \/>\nrtc.adjust(DateTime(t.tm_year + 1900, t.tm_mon + 1, t.tm_mday, t.tm_hour, t.tm_min, t.tm_sec));<br \/>\n}<\/p>\n<pre class=\"prism undefined-numbers lang-c\" data-lang=\"C\"><code><\/code><\/pre>\n<p>\/\/ Display string on LCD<br \/>\nvoid showMessage(char* s_new, char* s_old, int y0, int height) {<br \/>\nint16_t x1, y1;<br \/>\nuint16_t w, w2, h;<br \/>\nint x, y;<br \/>\nif (strcmp(s_new, s_old) != 0) {<br \/>\ntft.getTextBounds(s_old, 0, 0, &amp;x1, &amp;y1, &amp;w, &amp;h);<br \/>\nw2 = w * 11 \/ 10;<br \/>\ntft.fillRect((TFT_WIDTH &#8211; w2) \/ 2 , y0 &#8211; (height \/ 2) + 1, w2, height, ILI9341_BLACK),<br \/>\ntft.getTextBounds(s_new, 0, 0, &amp;x1, &amp;y1, &amp;w, &amp;h);<br \/>\ntft.setCursor((TFT_WIDTH &#8211; w) \/ 2, y0 + (h \/ 2) &#8211; 1);<br \/>\ntft.print(s_new);<br \/>\nstrcpy(s_old, s_new);<br \/>\n}<br \/>\n}<\/p>\n<pre class=\"prism undefined-numbers lang-c\" data-lang=\"C\"><code><\/code><\/pre>\n<p>\/\/ Main settings page<br \/>\nvoid handleRoot() {<br \/>\nint i;<\/p>\n<pre class=\"prism undefined-numbers lang-c\" data-lang=\"C\"><code><\/code><\/pre>\n<p>String html =<br \/>\n&#8220;&lt;!DOCTYPE html&gt;\\n&#8221;<br \/>\n&#8220;&lt;html&gt;\\n&#8221;<br \/>\n&#8220;&lt;head&gt;\\n&#8221;<br \/>\n&#8220;&lt;meta charset=\\&#8221;utf-8\\&#8221;&gt;\\n&#8221;<br \/>\n&#8220;&lt;title&gt;Alarm clock settings&lt;\/title&gt;\\n&#8221;<br \/>\n&#8220;&lt;\/head&gt;\\n&#8221;<br \/>\n&#8220;&lt;body&gt;\\n&#8221;<br \/>\n&#8220;&lt;form method=\\&#8221;get\\&#8221; action=\\&#8221;\/set\\&#8221;&gt;\\n&#8221;<br \/>\n&#8220;&lt;p&gt;\\n&#8221;<br \/>\n&#8220;&lt;select name=\\&#8221;hour\\&#8221;&gt;\\n&#8221;;<br \/>\nfor (i = 0; i &lt; 24; i++) {<br \/>\nhtml += &#8220;&lt;option value=\\&#8221;&#8221;;<br \/>\nhtml += String(i);<br \/>\nhtml += &#8220;\\&#8221;&gt;&#8221;;<br \/>\nhtml += String(i);<br \/>\nhtml += &#8220;&lt;\/option&gt;\\n&#8221;;<br \/>\n}<br \/>\nhtml += &#8220;&lt;\/select&gt;(h)\\n&#8221;;<br \/>\nhtml += &#8220;&lt;select name=\\&#8221;min\\&#8221;&gt;\\n&#8221;;<br \/>\nfor (i = 0; i &lt; 60; i++) {<br \/>\nhtml += &#8220;&lt;option value=\\&#8221;&#8221;;<br \/>\nhtml += String(i);<br \/>\nhtml += &#8220;\\&#8221;&gt;&#8221;;<br \/>\nhtml += String(i);<br \/>\nhtml += &#8220;&lt;\/option&gt;\\n&#8221;;<br \/>\n}<br \/>\nhtml += &#8220;&lt;\/select&gt;(min) \\n&#8221;;<br \/>\nhtml += &#8220;&lt;input type=\\&#8221;submit\\&#8221; name=\\&#8221;submit\\&#8221; value=\\&#8221;Alarm setting\\&#8221; \/&gt;\\n&#8221;;<br \/>\nhtml += &#8220;&lt;\/p&gt;\\n&#8221;;<br \/>\nhtml += &#8220;&lt;\/form&gt;\\n&#8221;;<br \/>\nhtml += &#8220;&lt;form method=\\&#8221;get\\&#8221; action=\\&#8221;\/set\\&#8221;&gt;\\n&#8221;;<br \/>\nhtml += &#8220;&lt;input type=\\&#8221;hidden\\&#8221; name=\\&#8221;off\\&#8221; value=\\&#8221;1\\&#8221;&gt;\\n&#8221;;<br \/>\nhtml += &#8220;&lt;p&gt;&lt;input type=\\&#8221;submit\\&#8221; name=\\&#8221;submit\\&#8221; value=\\&#8221;Alarm off\\&#8221; \/&gt;&lt;\/p&gt;\\n&#8221;;<br \/>\nhtml += &#8220;&lt;\/form&gt;\\n&#8221;;<br \/>\nhtml += &#8220;&lt;\/body&gt;\\n&#8221;;<br \/>\nhtml += &#8220;&lt;\/html&gt;\\n&#8221;;<br \/>\nserver.send(200, &#8220;text\/html&#8221;, html);<br \/>\n}<\/p>\n<pre class=\"prism undefined-numbers lang-c\" data-lang=\"C\"><code><\/code><\/pre>\n<p>\/\/ Set alarm<br \/>\nvoid handleSetAlarm() {<br \/>\nint i, hour, min, sec;<br \/>\nbool is_off = false;<br \/>\nString s_hour = &#8220;&#8221;, s_min = &#8220;&#8221;, s_sec = &#8220;&#8221;;<\/p>\n<pre class=\"prism undefined-numbers lang-c\" data-lang=\"C\"><code><\/code><\/pre>\n<p>\/\/ Get &#8220;off\/hour\/min\/sec&#8221; parameters from URL<br \/>\nfor (i = 0; i &lt; server.args(); i++) {<br \/>\nif (server.argName(i).compareTo(&#8220;off&#8221;) == 0) {<br \/>\nis_off = true;<br \/>\nbreak;<br \/>\n}<br \/>\nelse if (server.argName(i).compareTo(&#8220;hour&#8221;) == 0) {<br \/>\ns_hour = server.arg(i);<br \/>\n}<br \/>\nelse if (server.argName(i).compareTo(&#8220;min&#8221;) == 0) {<br \/>\ns_min = server.arg(i);<br \/>\n}<br \/>\nelse if (server.argName(i).compareTo(&#8220;sec&#8221;) == 0) {<br \/>\ns_sec = server.arg(i);<br \/>\n}<br \/>\n}<br \/>\n\/\/ Turn off alarm if &#8220;off&#8221; parameter is set if (is_off) {<br \/>\nstrcpy(alarm_time, &#8220;Off&#8221;);<br \/>\nserver.send(200, &#8220;text\/plain; charset=utf-8&#8221;, &#8220;Alarm turned off.&#8221;);<br \/>\n}<br \/>\n\/\/ Set alarm time else if (s_hour.length() &gt; 0 &amp;&amp; s_min.length() &gt; 0) {<br \/>\nhour = s_hour.toInt();<br \/>\nmin = s_min.toInt();<br \/>\nif (s_sec.length() &gt; 0) {<br \/>\nsec = s_sec.toInt();<br \/>\n}<br \/>\nelse {<br \/>\nsec = 0;<br \/>\n}<br \/>\nif (hour &gt;= 0 &amp;&amp; hour &lt;= 23 &amp;&amp; min &gt;= 0 &amp;&amp; min &lt;= 59 &amp;&amp; sec &gt;= 0 &amp;&amp; sec &lt;= 59) {<br \/>\nsprintf(alarm_time, &#8220;%02d:%02d:%02d&#8221;, hour, min, sec);<br \/>\nString msg = &#8220;Alarm set to &#8220;;<br \/>\nmsg.concat(alarm_time);<br \/>\nmsg.concat(&#8221; .&#8221;);<br \/>\nserver.send(200, &#8220;text\/plain; charset=utf-8&#8221;, msg);<br \/>\n}<br \/>\nelse {<br \/>\nserver.send(200, &#8220;text\/plain; charset=utf-8&#8221;, &#8220;Incorrect date\/time.&#8221;);<br \/>\n}<br \/>\n}<br \/>\nelse {<br \/>\nserver.send(200, &#8220;text\/plain; charset=utf-8&#8221;, &#8220;Incorrect parameters.&#8221;);<br \/>\n}<br \/>\n}<\/p>\n<pre class=\"prism undefined-numbers lang-c\" data-lang=\"C\"><code><\/code><\/pre>\n<p>\/ Stop alarm<br \/>\nvoid handleStopAlarm() {<br \/>\nmyDFPlayer.pause();<br \/>\nalarm_on = false;<br \/>\ntft.drawRect(30, 180, 260, 40, ILI9341_BLACK);<br \/>\nserver.send(200, &#8220;text\/plain&#8221;, &#8220;Alarm stop&#8221;);<br \/>\n}<\/p>\n<pre class=\"prism undefined-numbers lang-c\" data-lang=\"C\"><code><\/code><\/pre>\n<p>\/\/ If an invalid URL is specified<br \/>\nvoid handleNotFound() {<br \/>\nString message = &#8220;Not Found : &#8220;;<br \/>\nmessage += server.uri();<br \/>\nserver.send(404, &#8220;text\/plain&#8221;, message);<br \/>\n}<\/p>\n<pre class=\"prism undefined-numbers lang-c\" data-lang=\"C\"><code><\/code><\/pre>\n<p>\/\/ Setup<br \/>\nvoid setup() {<br \/>\nint16_t x1, y1;<br \/>\nuint16_t w, h;<\/p>\n<pre class=\"prism undefined-numbers lang-c\" data-lang=\"C\"><code><\/code><\/pre>\n<p>Serial.begin(115200);<\/p>\n<pre class=\"prism undefined-numbers lang-c\" data-lang=\"C\"><code><\/code><\/pre>\n<p>strcpy(old_date, &#8220;00000000000000&#8221;);<br \/>\nstrcpy(old_time, &#8220;00000000&#8221;);<br \/>\nstrcpy(old_alarm, &#8220;00000000000000&#8221;);<br \/>\nstrcpy(alarm_time, &#8220;Off&#8221;);<\/p>\n<pre class=\"prism undefined-numbers lang-c\" data-lang=\"C\"><code><\/code><\/pre>\n<p>\/\/ Initialize display<br \/>\ntft.begin();<br \/>\ntft.setRotation(3);<br \/>\ntft.fillScreen(ILI9341_BLACK);<br \/>\ntft.setTextColor(ILI9341_WHITE);<br \/>\ntft.setFont(&amp;FreeSans12pt7b);<br \/>\nString s = &#8220;Initializing&#8230;&#8221;;<br \/>\ntft.getTextBounds(s, 0, 0, &amp;x1, &amp;y1, &amp;w, &amp;h);<br \/>\ntft.setCursor(0, h);<br \/>\ntft.println(s);<\/p>\n<pre class=\"prism undefined-numbers lang-c\" data-lang=\"C\"><code><\/code><\/pre>\n<p>\/\/ Connect to WiFi<br \/>\nWiFi.begin(ssid, pass);<br \/>\nwhile (WiFi.status() != WL_CONNECTED) {<br \/>\ndelay(500);<br \/>\nSerial.print(&#8220;.&#8221;);<br \/>\n}<br \/>\nWiFi.config(ip, gateway, WiFi.subnetMask(), IPAddress(8, 8, 8, 8), IPAddress(8, 8, 4, 4));<br \/>\nSerial.println(&#8220;&#8221;);<br \/>\nSerial.println(&#8220;WiFi Connected.&#8221;);<br \/>\ntft.println(&#8220;WiFi Connected.&#8221;);<\/p>\n<pre class=\"prism undefined-numbers lang-c\" data-lang=\"C\"><code><\/code><\/pre>\n<p>\/\/ Initialize DFPlayer<br \/>\nhs.begin(9600, SERIAL_8N1, 16, 17);<br \/>\nint count = 0;<br \/>\nwhile (count &lt; 10) {<br \/>\nif (!myDFPlayer.begin(hs)) {<br \/>\ncount++;<br \/>\nSerial.print(&#8220;DFPlayer initialize attempt &#8220;);<br \/>\nSerial.println(count);<br \/>\n}<br \/>\nelse {<br \/>\nbreak;<br \/>\n}<br \/>\n}<br \/>\nif (count &lt; 10) {<br \/>\nSerial.println(&#8220;DFPlayer Initialized.&#8221;);<br \/>\ntft.println(&#8220;DFPlayer Initialized.&#8221;);<br \/>\nmyDFPlayer.pause();<br \/>\nmyDFPlayer.volume(DF_VOLUME);<br \/>\n}<br \/>\nelse {<br \/>\nSerial.println(&#8220;DFPlayer Error.&#8221;);<br \/>\ntft.println(&#8220;DFPlayer Error.&#8221;);<br \/>\nwhile(1);<br \/>\n}<\/p>\n<pre class=\"prism undefined-numbers lang-c\" data-lang=\"C\"><code><\/code><\/pre>\n<p>\/\/ Initialize RTC<br \/>\nif (!rtc.begin()) {<br \/>\nSerial.println(&#8220;Couldn&#8217;t find RTC&#8221;);<br \/>\nwhile (1);<br \/>\n}<br \/>\nSerial.println(&#8220;RTC Initialized&#8221;);<br \/>\ntft.println(&#8220;RTC Initialized.&#8221;);<\/p>\n<pre class=\"prism undefined-numbers lang-c\" data-lang=\"C\"><code><\/code><\/pre>\n<p>\/\/ Get current date\/time via NTP and set to RTC<br \/>\nsetTimeByNTP();<\/p>\n<pre class=\"prism undefined-numbers lang-c\" data-lang=\"C\"><code><\/code><\/pre>\n<p>\/\/ Initialize web server<br \/>\nserver.on(&#8220;\/&#8221;, handleRoot);<br \/>\nserver.on(&#8220;\/set&#8221;, handleSetAlarm);<br \/>\nserver.on(&#8220;\/stop&#8221;, handleStopAlarm);<br \/>\nserver.onNotFound(handleNotFound);<br \/>\nserver.begin();<\/p>\n<pre class=\"prism undefined-numbers lang-c\" data-lang=\"C\"><code><\/code><\/pre>\n<p>\/\/ Fill display with black<br \/>\ntft.fillScreen(ILI9341_BLACK);<br \/>\n}<\/p>\n<pre class=\"prism undefined-numbers lang-c\" data-lang=\"C\"><code><\/code><\/pre>\n<p>void loop() {<br \/>\nchar new_time[9], new_date[15], new_alarm[15];<\/p>\n<pre class=\"prism undefined-numbers lang-c\" data-lang=\"C\"><code><\/code><\/pre>\n<p>\/\/ Launch web server<br \/>\nserver.handleClient();<\/p>\n<pre class=\"prism undefined-numbers lang-c\" data-lang=\"C\"><code><\/code><\/pre>\n<p>\/\/ Display current date\/time on LCD<br \/>\nDateTime now = rtc.now();<br \/>\nsprintf(new_date, &#8220;%04d\/%02d\/%02d &#8220;, now.year(), now.month(), now.day());<br \/>\nstrcat(new_date, wdays[now.dayOfTheWeek()]);<br \/>\nsprintf(new_time, &#8220;%02d:%02d:%02d&#8221;, now.hour(), now.minute(), now.second());<br \/>\nstrcpy(new_alarm, &#8220;Alarm &#8220;);<br \/>\nstrcat(new_alarm, alarm_time);<br \/>\ntft.setFont(&amp;FreeSans18pt7b);<br \/>\ntft.setTextColor(ILI9341_WHITE);<br \/>\nshowMessage(new_date, old_date, 40, 28);<br \/>\nshowMessage(new_alarm, old_alarm, 200, 28);<br \/>\ntft.setFont(&amp;FreeSans40pt7b);<br \/>\nshowMessage(new_time, old_time, 120, 64);<\/p>\n<pre class=\"prism undefined-numbers lang-c\" data-lang=\"C\"><code><\/code><\/pre>\n<p>\/\/ Check if current time is time set for alarm<br \/>\nif (strstr(new_time, alarm_time) != NULL) {<br \/>\nif (!alarm_checked) {<br \/>\n\/\/ If it&#8217;s alarm time, ring out then send message to extension unit<br \/>\nmyDFPlayer.loop(1);<br \/>\nalarm_checked = true;<br \/>\nalarm_on = true;<br \/>\nalarm_ctr = 0;<br \/>\nHTTPClient http;<br \/>\nhttp.begin(notify_url);<br \/>\nint httpCode = http.GET();<br \/>\n}<br \/>\n}<br \/>\nelse {<br \/>\nalarm_checked = false;<br \/>\n}<br \/>\n\/\/ While alarm is sounding, make red frame flash around alarm time on display<br \/>\nif (alarm_on) {<br \/>\nif (alarm_ctr == 0) {<\/p>\n<pre class=\"prism undefined-numbers lang-c\" data-lang=\"C\"><code>\r\n<\/code><\/pre>\n<\/div>\n","protected":false},"excerpt":{"rendered":"\u6700\u521d\u4e8e2019\u5e7412\u67083\u65e5\u53d1\u5e03 \u8fd9\u7bc7\u6587\u7ae0\u6765\u6e90\u4e8eDevicePlus.com\u82f1\u8bed\u7f51\u7ad9\u7684\u7ffb\u8bd1\u7a3f\u3002 \u672c\u6587\u6700\u521d\u53d1\u5e03\u5728deviceplus.jp\u7f51\u7ad9\u4e0a\uff0c\u800c\u540e\u88ab\u7ffb\u8bd1\u6210\u82f1\u8bed\u3002 \u76ee\u5f55 \u524d\u8a00 \u5173\u4e8eESP32\u95f9\u949f \u521b\u5efa\u65e5\u671f\u548c\u65f6\u95f4\u7684\u201cRTC\u201d [&hellip;]","protected":false},"author":1,"featured_media":18835,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[1130],"tags":[],"class_list":["post-18834","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-arduino"],"acf":[],"wps_subtitle":"","_links":{"self":[{"href":"https:\/\/techclass.wfjydl.com\/wp-json\/wp\/v2\/posts\/18834","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/techclass.wfjydl.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/techclass.wfjydl.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/techclass.wfjydl.com\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/techclass.wfjydl.com\/wp-json\/wp\/v2\/comments?post=18834"}],"version-history":[{"count":12,"href":"https:\/\/techclass.wfjydl.com\/wp-json\/wp\/v2\/posts\/18834\/revisions"}],"predecessor-version":[{"id":21166,"href":"https:\/\/techclass.wfjydl.com\/wp-json\/wp\/v2\/posts\/18834\/revisions\/21166"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/techclass.wfjydl.com\/wp-json\/wp\/v2\/media\/18835"}],"wp:attachment":[{"href":"https:\/\/techclass.wfjydl.com\/wp-json\/wp\/v2\/media?parent=18834"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/techclass.wfjydl.com\/wp-json\/wp\/v2\/categories?post=18834"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/techclass.wfjydl.com\/wp-json\/wp\/v2\/tags?post=18834"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}