{"id":593,"date":"2022-11-18T16:36:54","date_gmt":"2022-11-18T08:36:54","guid":{"rendered":"http:\/\/wordpress.loc\/?p=593"},"modified":"2022-11-18T16:38:10","modified_gmt":"2022-11-18T08:38:10","slug":"esp32_ch1-11","status":"publish","type":"post","link":"https:\/\/www.nmking.io\/index.php\/2022\/11\/18\/593\/","title":{"rendered":"ESP32 arduino\u7db2\u8def\u63a7\u5236mp3\u64ad\u653e\u5668(dfplayer mini)"},"content":{"rendered":"\n<figure class=\"wp-block-pullquote\"><blockquote><p>\u56e0\u670b\u53cb\u7684\u9700\u6c42\uff0c\u6240\u4ee5\u505a\u4e86\u4e00\u500b\u7db2\u8def\u63a7\u5236\u7684mp3\u64ad\u653e\u5668\uff0c\u63a7\u5236\u65b9\u5f0f\u662f\u4f7f\u7528web\u7684url\u8b80\u53d6\u5167\u90e8\u6307\u4ee4\uff0c\u5176\u5be6\u6211\u4e5f\u505a\u904e\u85cd\u82bd\u8ddf\u7d05\u5916\u7dda\u7684\uff0c\u665a\u9ede\u518d\u6574\u7406\u4e00\u4e0b\u3002<\/p><\/blockquote><\/figure>\n\n\n\n<div style=\"height:100px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<div class=\"wp-block-ht-block-toc is-style-rounded htoc htoc--position-wide toc-list-style-plain\" data-htoc-state=\"expanded\"><span class=\"htoc__title\"><span class=\"ht_toc_title\">Table of Contents<\/span><span class=\"htoc__toggle\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"16\" height=\"16\"><g fill=\"#444\"><path d=\"M15 7H1c-.6 0-1 .4-1 1s.4 1 1 1h14c.6 0 1-.4 1-1s-.4-1-1-1z\"><\/path><path d=\"M15 1H1c-.6 0-1 .4-1 1s.4 1 1 1h14c.6 0 1-.4 1-1s-.4-1-1-1zM15 13H1c-.6 0-1 .4-1 1s.4 1 1 1h14c.6 0 1-.4 1-1s-.4-1-1-1z\"><\/path><\/g><\/svg><\/span><\/span><div class=\"htoc__itemswrap\"><ul class=\"ht_toc_list\"><li class=\"\"><a href=\"#htoc-\">\u4e00\u3001\u6750\u6599\u6e96\u5099<\/a><\/li><li class=\"\"><a href=\"#htoc-esp32\">\u4e8c\u3001ESP32\u7dda\u8def\u4f48\u7f6e<\/a><\/li><li class=\"\"><a href=\"#htoc-mp3\">\u4e09\u3001\u8907\u88fdmp3\u5230\u8a18\u61b6\u5361\u4e2d<\/a><\/li><li class=\"\"><a href=\"#htoc-esp321\">\u56db\u3001\u5beb\u5165ESP32\u7a0b\u5f0f<\/a><\/li><li class=\"\"><a href=\"#htoc-1\">\u4e94\u3001\u5c55\u793a<\/a><\/li><\/ul><\/div><\/div>\n\n\n\n<p>\u6211\u7684ESP32\u5be6\u505a\u66f8\u7c4d\uff1a<a rel=\"noreferrer noopener\" href=\"https:\/\/www.nmking.io\/index.php\/2022\/11\/10\/esp32_ch1-2\/\" target=\"_blank\">\u6211\u51fa\u66f8\u4e86 ESP32 \u7269\u806f\u7db2\u5c08\u984c<\/a><br>\u535a\u5ba2\u4f86\u7db2\u5740\uff1a<a rel=\"noreferrer noopener\" href=\"https:\/\/www.books.com.tw\/products\/0010901195\" target=\"_blank\">https:\/\/www.books.com.tw\/products\/0010901195<\/a><\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity is-style-wide\"\/>\n\n\n\n<div style=\"height:100px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"htoc-\">\u4e00\u3001\u6750\u6599\u6e96\u5099<\/h2>\n\n\n\n<p>ESP32\uff1a\u8a73\u7d30\u8aaa\u660e\u8acb\u53c3\u8003\uff1a<a rel=\"noreferrer noopener\" href=\"https:\/\/www.nmking.io\/index.php\/2022\/09\/13\/esp32_ch1\/\" target=\"_blank\">ESP32 Arduino\u958b\u767c\u74b0\u5883\u67b6\u8a2d\uff08\u53d6\u4ee3Arduino UNO\u53caESP8266\u9996\u9078\uff09<\/a><br>(\u9732\u5929\u641c\u5c0b\uff1a<a href=\"https:\/\/t.ly\/p7A6M\" target=\"_blank\" rel=\"noreferrer noopener\">\u53ef\u958b\u767c\u7968\u6536\u64da\u5b89\u4fe1\u53ef\u5c0f\u9738\u738b \u578b\u865fNODEMCU-32S ESP32 Arduino \u542b\u85cd\u82bdWIFI<\/a>)<br>Dfplayer mini mp3\uff1a\u5728\u9732\u5929\u641c\u5c0b&#8221;Dfplayer&#8221;\uff0c\u53e6\u5916\u9084\u6709\u4e00\u6b3emp3-TF-1xP\uff0c\u5176\u7d50\u69cb\u529f\u80fd\u662f\u5b8c\u5168\u4e00\u6a23\u7684<\/p>\n\n\n\n<figure class=\"wp-block-image size-large is-resized\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" src=\"https:\/\/i0.wp.com\/pic.pimg.tw\/youyouyou\/1582005312-3471682467.png?resize=839%2C431&#038;ssl=1\" alt=\"\" width=\"839\" height=\"431\"\/><figcaption class=\"wp-element-caption\">Dfplayer mini\u6a21\u7d44\u8173\u4f4d\u4f4d\u7f6e\u5716<\/figcaption><\/figure>\n\n\n\n<p>Speaker\uff1a\u9732\u5929\u641c\u5c0b&#8221;Arduino \u5587\u53ed \u6b50\u59c6&#8221;\uff0c\u7db2\u8def\u5e38\u898b\u7684\u662f8\u6b50\u59c6\uff0c\u4e5f\u53ef\u4ee5\u8cb7\u66f4\u5927\u7684<\/p>\n\n\n\n<figure class=\"wp-block-image aligncenter size-large is-resized\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" src=\"https:\/\/i0.wp.com\/pic.pimg.tw\/youyouyou\/1582005297-1033317147.png?resize=441%2C418&#038;ssl=1\" alt=\"\" width=\"441\" height=\"418\"\/><figcaption class=\"wp-element-caption\">Speaker\u6a21\u7d44\u5546\u54c1\u5716<\/figcaption><\/figure>\n\n\n\n<p>\u8a18\u61b6\u5361\uff1a\u4f9d\u7167\u9700\u8981\u8cfc\u8cb7\u9069\u5408\u5927\u5c0f\u7684\u8a18\u61b6\u5361\uff0c\u8a18\u5f97\u6700\u9ad8\u652f\u63f432G\uff0c\u592a\u5927\u4e0d\u652f\u63f4<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"htoc-esp32\">\u4e8c\u3001ESP32\u7dda\u8def\u4f48\u7f6e<\/h2>\n\n\n\n<p>RX\u63a5\u5728GPIO13\uff0c\u7de8\u865f\u53ef\u4ee5\u5728\u7a0b\u5f0f\u5167\u66f4\u6539\uff0c\u672c\u6b21\u4f7f\u7528esp32\u7684\u786c\u9ad4\u5e8f\u5217\uff0c\u800c\u4ee5\u5f80\u7684\u7d93\u9a57ESP32\u7684\u8edf\u9ad4\u5e8f\u5217\u4f3c\u4e4e\u6709\u9ede\u554f\u984c\u3002<br>TX\u9019\u88e1\u6211\u6c92\u63a5\uff0c\u529f\u80fd\u662f\u53ef\u4ee5\u67e5\u8a62mp3 player\u7684\u72c0\u614b\uff0c\u56e0\u70ba\u6211\u6c92\u6709\u7528\u5230\u6240\u4ee5\u6c92\u63a5<br>speaker\u53ef\u4e0d\u5206\u6b63\u8ca0\u6975<\/p>\n\n\n\n<figure class=\"wp-block-image size-large is-resized\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" src=\"https:\/\/i0.wp.com\/pic.pimg.tw\/youyouyou\/1582005277-3580619456_n.png?resize=840%2C389&#038;ssl=1\" alt=\"\" width=\"840\" height=\"389\"\/><figcaption class=\"wp-element-caption\">ESP32\u8207mp3 player\u7dda\u8def\u4f48\u7f6e\u5716<\/figcaption><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"htoc-mp3\">\u4e09\u3001\u8907\u88fdmp3\u5230\u8a18\u61b6\u5361\u4e2d<\/h2>\n\n\n\n<p>\u4f9d\u7167\u898f\u5b9a\uff0c\u5148\u5728\u8a18\u61b6\u5361\u4e2d\u5efa\u7acb\u4e00\u500b\u540d\u7a31\u70bamp3\u7684\u8cc7\u6599\u593e\uff0c\u518d\u5c07\u9700\u8981\u64ad\u653e\u7684mp3\u6a94\u6848\u653e\u5165\uff0c\u6a94\u6848\u5fc5\u9808\u66f4\u6539\u70ba000x.mp3<\/p>\n\n\n\n<figure class=\"wp-block-image size-large is-resized\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" src=\"https:\/\/i0.wp.com\/pic.pimg.tw\/youyouyou\/1581876652-2532443205.png?resize=839%2C590&#038;ssl=1\" alt=\"\" width=\"839\" height=\"590\"\/><figcaption class=\"wp-element-caption\">\u64ad\u653e\u6a94\u6848\u540d\u7a31\u9808\u4fee\u6539<\/figcaption><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"htoc-esp321\">\u56db\u3001\u5beb\u5165ESP32\u7a0b\u5f0f<\/h2>\n\n\n\n<p>1.\u4e0b\u8f09\u51fd\u5f0f\u5eab\u4e26\u5b8c\u6210\u5b89\u88dd\uff1a <a href=\"https:\/\/github.com\/DFRobot\/DFRobotDFPlayerMini\" target=\"_blank\" rel=\"noreferrer noopener\">https:\/\/github.com\/DFRobot\/DFRobotDFPlayerMini<\/a><\/p>\n\n\n\n<p>2.\u8907\u88fd\u7a0b\u5f0f\u5982\u4e0b\uff0c\u4e26\u8acb\u8a18\u5f97\u4fee\u6539\u7b2c5-6\u884c\u7684wifi\u9023\u7dda\u8cc7\u8a0a<\/p>\n\n\n\n<script src=\"https:\/\/gist.github.com\/youjunjer\/5d1ca235dc2b05c82bbc6e460743eb96.js\"><\/script>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"htoc-1\">\u4e94\u3001\u5c55\u793a<\/h2>\n\n\n\n<p>\u57f7\u884c\u65b9\u6cd5\u5f88\u7c21\u55ae\uff0c\u5c31\u662f\u5728\u7db2\u5740\u5217\u8f38\u5165\u8981\u64ad\u653e\u7684mp3\u6a94\u6848\uff0c\u4f8b\u5982\u8f38\u5165\u300c <a href=\"http:\/\/192.168.1.133\/?mp3=4;\" target=\"_blank\" rel=\"noreferrer noopener\">http:\/\/192.168.1.133\/?mp3=4; <\/a>\u300d\u4ee3\u8868\u8981\u64ad\u653e\u7b2c\u56db\u9996\u6b4c\uff0c\u5176\u4e2d\u5c3e\u5df4\u7684\u300c;\u300d\u4e0d\u53ef\u7701\u7565\uff0c\u6b64\u8655\u70ba\u4f5c\u70ba\u5224\u65b7\u7d50\u5c3e\u7528\u3002<br>\u82e5\u8f38\u5165mp3=0;\u5247\u4ee3\u8868\u505c\u6b62\u64ad\u653e\u7684\u610f\u601d<\/p>\n\n\n\n<figure class=\"wp-block-image size-large is-resized\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" src=\"https:\/\/i0.wp.com\/pic.pimg.tw\/youyouyou\/1582005235-979122347.png?resize=840%2C265&#038;ssl=1\" alt=\"\" width=\"840\" height=\"265\"\/><figcaption class=\"wp-element-caption\">\u7db2\u5740\u5217\u8f38\u5165\u8981\u64ad\u653e\u7684mp3\u6a94\u6848<\/figcaption><\/figure>\n\n\n\n<figure class=\"wp-block-embed is-type-video is-provider-youtube wp-block-embed-youtube wp-embed-aspect-16-9 wp-has-aspect-ratio\"><div class=\"wp-block-embed__wrapper\">\n<iframe loading=\"lazy\" title=\"ESP32 arduino\u7db2\u8def\u63a7\u5236mp3\u64ad\u653e\u5668(dfplayer mini)\" width=\"1290\" height=\"726\" src=\"https:\/\/www.youtube.com\/embed\/dL7Le1gVRxY?feature=oembed\" frameborder=\"0\" allow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share\" referrerpolicy=\"strict-origin-when-cross-origin\" allowfullscreen><\/iframe>\n<\/div><\/figure>\n","protected":false},"excerpt":{"rendered":"<p>\u56e0\u670b\u53cb\u7684\u9700\u6c42\uff0c\u6240\u4ee5\u505a\u4e86\u4e00\u500b\u7db2\u8def\u63a7\u5236\u7684mp3\u64ad\u653e\u5668\uff0c\u63a7\u5236\u65b9\u5f0f\u662f\u4f7f\u7528web\u7684url\u8b80\u53d6\u5167\u90e8\u6307\u4ee4\uff0c\u5176\u5be6\u6211\u4e5f\u505a\u904e\u85cd\u82bd\u8ddf [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[1],"tags":[],"class_list":["post-593","post","type-post","status-publish","format-standard","hentry","category-esp32"],"blocksy_meta":[],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack-related-posts":[],"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/www.nmking.io\/index.php\/wp-json\/wp\/v2\/posts\/593","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.nmking.io\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.nmking.io\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.nmking.io\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.nmking.io\/index.php\/wp-json\/wp\/v2\/comments?post=593"}],"version-history":[{"count":2,"href":"https:\/\/www.nmking.io\/index.php\/wp-json\/wp\/v2\/posts\/593\/revisions"}],"predecessor-version":[{"id":1016,"href":"https:\/\/www.nmking.io\/index.php\/wp-json\/wp\/v2\/posts\/593\/revisions\/1016"}],"wp:attachment":[{"href":"https:\/\/www.nmking.io\/index.php\/wp-json\/wp\/v2\/media?parent=593"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.nmking.io\/index.php\/wp-json\/wp\/v2\/categories?post=593"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.nmking.io\/index.php\/wp-json\/wp\/v2\/tags?post=593"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}